Skip to content

Instantly share code, notes, and snippets.

@tacone
Created May 5, 2021 19:30
Show Gist options
  • Save tacone/740c56d6bc8c17551e3c88a8d82b7f89 to your computer and use it in GitHub Desktop.
Save tacone/740c56d6bc8c17551e3c88a8d82b7f89 to your computer and use it in GitHub Desktop.
A query to print the whole schema
fragment FullType on __Type {
kind
name
fields(includeDeprecated: true) {
name
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
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
}
}
}
}
}
}
}
}
query IntrospectionQuery {
__schema {
queryType {
...FullType
}
mutationType {
name
}
types {
...FullType
}
directives {
name
locations
args {
...InputValue
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment