-
Notifications
You must be signed in to change notification settings - Fork 433
Implement introspection schema.json generation #307
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
Example query: query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
subscriptionType {
name
}
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type {
...TypeRef
}
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
} |
Juniper is able to process this query, but
I was looking at https://github.com/facebook/graphql/blob/master/spec/Section%204%20--%20Introspection.md and there I see that this is fixed (c7d1481). So I will probably have to wait for another realease or use master. |
@mrceperka yeah it's currently in master, so you could use a Git dependency for now until we push out a patch release. |
I have implemented this. Just cleaning up the code and adding tests before putting up a PR. |
Hmmm, actually my PR may does fix this issue...it doesn't output in JSON. Which is different. |
Fixes graphql-rust#307. Add support for introspection
Fixes graphql-rust#307. Add support for introspection
Implement a method to easily create a
schema.json
introspection schema used by tools likeapollo
cli and https://github.com/graphql-rust/graphql-client.For simplicity I'd just execute the introspection query against the schema and return the result.
The text was updated successfully, but these errors were encountered: