-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Actual
Currently when executing the function getIntrospectionQuery with all the options enabled to true, it does produce the following query that is invalid due the following errors: Cannot query field and Unknown argument.
const source = getIntrospectionQuery({
descriptions: true,
specifiedByUrl: true,
directiveIsRepeatable: true,
schemaDescription: true,
inputValueDeprecation: true,
oneOf: true,
});The introspection query and errors result are shown above.
Expected
When executing the function getIntrospectionQuery with all options enabled to true it does produce a valid introspection query that can be used for checking all the current type system schema.
Motivation
Currently I'm building a set of CLI libraries that allows to do validations from any implementation against the GraphQL standard:
- https://github.com/graphql-go/compatibility-unit-tests
- https://github.com/graphql-go/compatibility-standard-definitions
- https://github.com/graphql-go/compatibility-user-acceptance
And found this issue while working in the following library: https://github.com/graphql-go/compatibility-standard-definitions
Query
query IntrospectionQuery {
__schema {
description
queryType { name kind }
mutationType { name kind }
subscriptionType { name kind }
types {
...FullType
}
directives {
name
description
isRepeatable
locations
args(includeDeprecated: true) {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
specifiedByURL
isOneOf
fields(includeDeprecated: true) {
name
description
args(includeDeprecated: true) {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields(includeDeprecated: true) {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type { ...TypeRef }
defaultValue
isDeprecated
deprecationReason
}
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
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
}
}
Errors
{
"errors": [
{
"message": "Cannot query field \"description\" on type \"__Schema\". Did you mean \"subscriptionType\"?",
"locations": [
{
"line": 3,
"column": 9
}
]
},
{
"message": "Cannot query field \"isRepeatable\" on type \"__Directive\".",
"locations": [
{
"line": 13,
"column": 11
}
]
},
{
"message": "Unknown argument \"includeDeprecated\" on field \"args\" of type \"__Directive\".",
"locations": [
{
"line": 15,
"column": 16
}
]
},
{
"message": "Cannot query field \"specifiedByURL\" on type \"__Type\".",
"locations": [
{
"line": 26,
"column": 7
}
]
},
{
"message": "Cannot query field \"isOneOf\" on type \"__Type\".",
"locations": [
{
"line": 27,
"column": 7
}
]
},
{
"message": "Unknown argument \"includeDeprecated\" on field \"args\" of type \"__Field\".",
"locations": [
{
"line": 31,
"column": 14
}
]
},
{
"message": "Unknown argument \"includeDeprecated\" on field \"inputFields\" of type \"__Type\".",
"locations": [
{
"line": 40,
"column": 19
}
]
},
{
"message": "Cannot query field \"isDeprecated\" on type \"__InputValue\".",
"locations": [
{
"line": 62,
"column": 7
}
]
},
{
"message": "Cannot query field \"deprecationReason\" on type \"__InputValue\".",
"locations": [
{
"line": 63,
"column": 7
}
]
}
]
}
Metadata
Metadata
Assignees
Labels
No labels