-
Notifications
You must be signed in to change notification settings - Fork 657
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
Introspection is broken in the beta #5641
Comments
Thanks for the report. We'll look into it. Double checking: the message says Missing "Authorization" Header but you're sending a "Subscription-Key" header. Is that expected? Also, would be interesting to try using the apollo {
service("service") {
packageName.set("com.example")
introspection {
schemaFile.set(file("data/api/src/main/graphql/schema.graphqls"))
endpointUrl.set("https://our_domain.com/path")
headers.put("Subscription-Key", "our_key")
}
}
} |
I made a TCP capture of both versions: 3.8.2
4.0.0-beta.4
There are additional headers but nothing that should cause too many issues I think? |
Yes, subscription key is the only header we need to set with lower version to make it work.
We were already using this:
When I try to download via your Android Studio plugin, the error is |
Can you try from the command line?
Alternatively, it could be interesting to try different headers values with curl:
Try with and without the |
Also tried with I did notice that introspection had issues recently (https://github.com/apollographql/apollo-kotlin/releases) and a fix was attempted in the latest release but looks like it's not the proper fix. |
That is surprising. This is the main difference with v3. The other big one being that the contents of the introspection query changed. v4 implements 2-step introspection in order to get the list of supported features dynamically. As GraphQL is evolving, introspection supports more features like Could it be that your backend requires some whitelisting of the queries or rejects the query PreIntrospectionQuery {
__schema {
types {
...TypeFields
}
}
}
fragment TypeFields on __Type {
name
fields {
name
args {
name
}
}
} |
PS: if you're willing to privately share the url and a Subscription-Key, I'm pretty sure we can get to the bottom of is quite quickly. Feel free to dm me at martin at apollographql.com |
@ber4444 thank you for providing details in DM but unfortunately I haven't been able to reproduce the issue neither in 3.8.2 nor 4.x. It looks like your endpoint is secured through different means and without more details, It's pretty hard to debug. 4.x uses different queries to implement 2-step introspection which means the HTTP requests are different and my guess is that some security policies have been set against the 3.x behaviour and should be updated for 4.x. I'm going to close this one. Let me know if anything new comes up. |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better. |
Beta 5 resolved this |
Glad to hear that! Thanks for the update! |
Version
4.0.0-beta.4
Summary
./gradlew :data:api:downloadApolloSchema --endpoint='https://our_domain.com/path' --schema=data/api/src/main/graphql/schema.graphqls --header="Subscription-Key: our_key"
works with Apollo 3.8.2 but broken with the latest betaSteps to reproduce the behavior
Run introspection after upgrading to the beta
Logs
The text was updated successfully, but these errors were encountered: