You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generator chocked on the issue with this error:
Fatal error: Uncaught RuntimeException: Reached the limit of nesting in type info in some/path/\vendor/gmostafa/php-graphql-oqm/src/SchemaGenerator/SchemaClassGenerator.php:333
Indeed, by adding more depth to the introspection sub-query \GraphQL\SchemaGenerator\SchemaInspector::TYPE_SUB_QUERY, I was able to unlock the problem:
But, this is hardly an solution. That solved my problem punctually and very temporarily.
No doubt, that someone will encounter a even more deeply nested type. So, the solution would be to try to go deeper whenever the ofType is not found, until we get the exact same answer from the server. If we get the same answer after trying to do deeper, then that's our cue that something is wrong with the schema, then naturally bail out of the generation process (as currently)
Alternatively, we could add an option to indicate how deep one wants to go.
I could try to code that into a PR, but I don't know when I'll be able to.
The text was updated successfully, but these errors were encountered:
I had an issue with a schema that had a element of this type:
The generator chocked on the issue with this error:
Fatal error: Uncaught RuntimeException: Reached the limit of nesting in type info in some/path/\vendor/gmostafa/php-graphql-oqm/src/SchemaGenerator/SchemaClassGenerator.php:333
Indeed, by adding more depth to the introspection sub-query
\GraphQL\SchemaGenerator\SchemaInspector::TYPE_SUB_QUERY
, I was able to unlock the problem:But, this is hardly an solution. That solved my problem punctually and very temporarily.
No doubt, that someone will encounter a even more deeply nested type. So, the solution would be to try to go deeper whenever the
ofType
is not found, until we get the exact same answer from the server. If we get the same answer after trying to do deeper, then that's our cue that something is wrong with the schema, then naturally bail out of the generation process (as currently)Alternatively, we could add an option to indicate how deep one wants to go.
I could try to code that into a PR, but I don't know when I'll be able to.
The text was updated successfully, but these errors were encountered: