-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Proposal: Add supported GraphQL spec version to introspection #543
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
Comments
@jimkyndemeyer
Starting from that release we shouldn't introduce any breaking changes:
We already discussed it on WG and it conflicts with our RFC procedure: We need to able to experiment we adding new fields to introspection at That means we can't tie the existence of new fields to official spec releases.
And based on fields that are present, second introspection query will be formed. I plan to implement this in PS. I also think two stage introspection is an excellent way to allow |
Hi Ivan. Thanks for the detailed response. It's great to hear that there's thinking in this area. What I'm really after is the best possible developer experience. The guiding principles along with a focus on non-breaking changes post-June 2018 appears to address the issue of incompatible introspection queries for now. I'll close the issue on that basis. |
@IvanGoncharov I think the ability to extend the introspection schema is very interesting, as a way to, for example, expose effects of custom directives in a way which isn't tied to SDL. I stumbled upon this 2-step approach in this issue – but can't seem to find any issue dedicated to this task. Do you know if it's actively being worked on? Simply the ability to swap the Sorry for hijacking this issue. |
@victorandree I believe this is related to your issue: #300 |
As the spec evolves, and breaking changes come into play, it's increasingly difficult to build IDE plugins and other tooling that "just works" with various endpoint libraries that support different versions of the spec.
I've seen this numerous times in the issues I get for JS GraphQL IntelliJ plugin, and I believe that graphiql also has a number of workarounds to try and support introspection across multiple spec versions.
My suggestion is to add a new top level field that complements
__schema
and the other introspection fields. This field could be called something like__specs
and would return a chronological list of the versions that the endpoint supports.Tools/IDEs would initially do a
{__specs}
query to determine the version supported, and could then send a supported version of an introspection query. In case the specs field is not present, a validation error will be returned by the server, and June 2018 or older is assumed.Thoughts, comments?
The text was updated successfully, but these errors were encountered: