-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Deprecated arguments are missing in introspection query #2345
Comments
Hey @hwielenberg, I think there are a couple of issues you're reporting here so let's try and take it 1-by-1. First:
Can you provide an example of the introspection query you're using? I think, we used to include the deprecated fields by default, but that was against the spec. There is a
OK this is weird. Can you provide some more info on this one regarding for which definitions are included by default? AFAICT it should default to
Thanks for providing those. I'll take a look and see where are the inconsistencies coming from |
We use One of our clients uses this js library and run into the issue as well. |
I added some more deprecated fields here - but that doesn't cause any additional errors in my tests.
Looking at the spec it looks like |
Well it is supported in the latest draft of the spec |
OK so AFAICT there are a few different things at play here 🙃 So, first thing is that I think the server used to return deprecated fields by default (which was wrong). The server now behaves correctly, and will return the deprecated fields if Introspection query with deprecated args included (Click to expand)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(includeDeprecated: true) { # <---- HERE
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields(includeDeprecated: true) { # <---- AND HERE
...InputValue
}
}
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
}
}
}
}
}
}
}
} Now onto the introspection client (both caliban's and external). My guess is that since the addition of the |
See my comment in the PR description: #1932 (comment) If we add it we have to do like this to not break targeting servers that don't support it: #1732 |
@kyri-petrou |
Since we upgraded from 2.02 to 2.6.0 introspection queries no longer return arguments marked as deprecated.
This doesn't seem to affect all definitions that are marked as deprecated.
I managed to reproduce the issues with new tests here:
hwielenberg@9a18e0b
Our main problem is the
ArgumentAdded
error in theIntrospectionClientSpec
spec. But the tests show other inconsistencies as well.Here are the failures:
The text was updated successfully, but these errors were encountered: