-
-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow new kind of type in introspection #272
Comments
Introspection only supports type kinds defined by spec. I am not sure if we should support custom extensions like this. Did you try it with existing tools like GraphiQL? Does it work? |
No it's the issue, since it's throwing an exception, GraphiQL doesn't work. |
I do agree that input union is a useful thing and I miss them myself. But I don't agree that we should allow non-spec-compliant custom type kinds in the base library. The way to go for this kind of change is to support the RFC you posted previously and have it included in the spec eventually. |
It should be possible to create a new kind of type without having the error
Unknown kind of type: MyCustomType
when introspecting the schema (see https://github.com/webonyx/graphql-php/blob/master/src/Type/Introspection.php#L419).For example, we have this type in API Platform: https://github.com/api-platform/core/blob/master/src/GraphQl/Type/Definition/InputUnionType.php
And we can't introspect the schema because of the use of this new type.
We should at least be able to extend easily the related parts (not the case since it's inside an anonymous function).
The text was updated successfully, but these errors were encountered: