Skip to content

[Proposed change] Add support for schema metadata in introspection #390

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

Closed
taion opened this issue Dec 20, 2017 · 3 comments
Closed

[Proposed change] Add support for schema metadata in introspection #390

taion opened this issue Dec 20, 2017 · 3 comments

Comments

@taion
Copy link

taion commented Dec 20, 2017

I would like to have a way to communicate schema metadata like a version or revision via the introspection mechanism.

We've found it useful for coordinating between the back end team and our front end teams to indicate the deployed version of the GraphQL schema and server in our dev environment.

Broadly, this seems like a more general thing. Currently we're setting this as the description on our query type, but that doesn't seem quite right.

The connection to things currently done by introspection are somewhat loose, but I think this satisfies how one would want such a feature to work decently well. "Real" clients should never query for fields like schema version per many discussions here around backward compatibility, but it can be quite convenient for developers to have some way to communicate what specifically is deployed within just the introspection mechanism.

@RemyRylan
Copy link

This would also be a great route for supplying validation info such as JSON Schema, string minLength, maxLength, etc... I currently force this into the description as well, but it would be so much more useful if it were standardized so that tools could be built around a common expectation of field metadata.

@taion
Copy link
Author

taion commented Dec 20, 2017

Oh, wait, can we do this with schema directives?

@taion
Copy link
Author

taion commented Dec 20, 2017

My bad. This is essentially a dupe of #300.

@taion taion closed this as completed Dec 20, 2017
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