php-graphql-oqm icon indicating copy to clipboard operation
php-graphql-oqm copied to clipboard

Don't generate empty argument objects

Open jorrit opened this issue 4 years ago • 1 comments

I have a fairly large API and as such a lot of PHP files are generated by the OQM code generator.

Most of the field in my schema have no arguments, but right now the OQM generates an empty ArgumentsObject class for each object field.

This PR enhances the code generator so an ArgumentsObject is only generated when a field accepts arguments.

jorrit avatar Sep 06 '21 15:09 jorrit

@mghoneimy I've tried this change on my code base and it removes a large amount of useless classes.

jorrit avatar Sep 07 '21 15:09 jorrit