php-graphql-oqm
php-graphql-oqm copied to clipboard
Duplicate Method Names
Thank you very much for this awesome tool. I encountered an (admittedly, rather odd) edge-case for which I would open a PR if you consider it worth it (and tell me what your desired resolution is).
The problem is the following:
Duplicate methods are generated for an API with two fields in two different "cases".
Example: an API that has a field timeZone and a field time_zone (of which one might be deprecated) (this applies e.g. to Pipefy: https://api-docs.pipefy.com/reference/objects/User/) will result in two times the function
public function selectTimeZone()
, one time selecting timeZone and one time time_zone.
PHP does not like that of course. I can imagine various resultions: If there are multiple,
- just discard the deprecated one,
- use the case as used in the API (i.e. resulting in one
selectTimeZone()and oneselectTime_zone(), - select both at once
Shall I open a PR with which of these possibilities? (Any hints on where to look for the deciding code?)
This particular API also includes fields with the name field (e.g. here: https://api-docs.pipefy.com/reference/objects/CardField/) which leads to SomeChileQueryObject::selectField( overriding AbstractQueryBuilder::selectField(