Skip to content
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

Can metadata information be included in the introspection query? #733

Closed
gjtorikian opened this issue May 23, 2017 · 4 comments
Closed

Can metadata information be included in the introspection query? #733

gjtorikian opened this issue May 23, 2017 · 4 comments

Comments

@gjtorikian
Copy link
Contributor

I admit I haven't looked into the spec or the code much, but: one can define metadata definitions for new properties on GraphQL items. Could this be exposed in the introspection query?

I think it'd be neat for tooling cough https://github.com/gjtorikian/graphql-docs cough to be able to represent this information. I am not sure if the use case is so narrow that it doesn't apply, and that's fine. I just want to open a discussion to see if it makes sense.

@rmosolgo
Copy link
Owner

The spec makes no mention of extending the introspection types: https://facebook.github.io/graphql/#sec-Schema-Introspection

I'm open to supporting extending those types, but I don't have much of an idea how to do it.

One way to do it might be, when IDL-to-Schema support is better ( #727 ), is to allow overrides of the built-in introspection types in the IDL, then use user-provided behaviors to resolve them.

@gjtorikian gjtorikian changed the title Can metadata information be included in the introspection query Can metadata information be included in the introspection query? Jun 13, 2017
@rmosolgo
Copy link
Owner

rmosolgo commented Dec 9, 2017

I'm trying to support this in 1.8 via #1170, does that look like it would do the job?

@gjtorikian
Copy link
Contributor Author

I'm not sure. It seems that the community is still deciding on what a metadata format should look like (graphql/graphql-spec#300) so jumping ahead and defining a format for that might not be the best. As @xuorig mentioned in another thread:

Given that no 3rd party tools can use this information right now since it breaks the spec, it almost seems like the only users would be ourselves.

@rmosolgo
Copy link
Owner

This is possible in GraphQL-Ruby now, we can track spec changes on the above-mentioned issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants