Closed hpohlmeyer closed 4 months ago
When you run the following query, what __typename
are you getting for your args
?
query IntrospectSupportQuery {
__schema {
types {
fields {
name
args {
name
__typename
## isDeprecated ## you can uncomment this to try if the field itself is supported
}
}
}
}
}
And when you run
query IntrospectSupportQuery {
__schema {
directives {
name
locations
}
}
}
What does deprecated give you here for locations?
When you run the following query, what __typename are you getting for your args?
I am getting __InputValue
for the args. The isDeprecated
property seems to be supported.
What does deprecated give you here for locations?
FIELD_DEFINITION
ENUM_VALUE
ARGUMENT_DEFINITION
INPUT_FIELD_DEFINITION
That's really weird, they have the right type and support deprecationReason
on args
but don't support the includeDeprecated
argument.
EDIT: wait... it is present
"fields": [
{
"name": "args",
"args": [
{
"name": "includeDeprecated",
"__typename": "__InputValue",
"isDeprecated": false
}
]
},
Describe the bug
When generating a schema via the CLI, I get the error:
I did a little bug-hunting and was on a similar route to #142. The support query is supposed to ensure that the introspection query does not use properties that are not supported by the schema. Unfortunately the support query does not cover this case.
Bug cause
I have recreated the
IntrospectSupportQuery
and tried it against my endpoint (provided by DatoCMS).IntrospectSupportQuery
```gql query IntrospectSupportQuery { directive: __type(name: "__Field") { fields { name } } type: __type(name: "__Type") { fields { name } } inputValue: __type(name: "__InputValue") { fields { name } } } ```IntrospectionSupportQuery Results
```json { "data": { "directive": { "fields": [ { "name": "args" }, { "name": "deprecationReason" }, { "name": "description" }, { "name": "isDeprecated" }, { "name": "name" }, { "name": "type" } ] }, "type": { "fields": [ { "name": "description" }, { "name": "enumValues" }, { "name": "fields" }, { "name": "inputFields" }, { "name": "interfaces" }, { "name": "kind" }, { "name": "name" }, { "name": "ofType" }, { "name": "possibleTypes" } ] }, "inputValue": { "fields": [ { "name": "defaultValue" }, { "name": "deprecationReason" }, { "name": "description" }, { "name": "isDeprecated" }, { "name": "name" }, { "name": "type" } ] } } } ```As you can see it includes
inputValue.fields.isDeprecated
, which meansinputValueDeprecation
is marked as supported.In the
IntrospectionQuery
, theargs
field is using theincludeDeprecated
argument, wheninputValueDeprecation
is marked as supported., which causes my schema generation to fail.I am not very familiar with the GraphQL spec, so I don’t know if that is an error in the implementation of the spec, or a shortcoming of the
IntrospectionSupportQuery
. If the spec is implemented incorrectly, would it be possible to have a way to manually overwrite the results of the support query?Reproduction
No response
gql.tada version
gql.tada v1.4.3
Validations