-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Introspection query doesn't return latest schema changes when query plan is being persisted on Redis #5006
Comments
I think that is related to #4883 The schema aware hash is in : router/apollo-router/src/spec/query/change.rs Lines 72 to 80 in a709cff
|
Thanks for opening this, @nathanmarcos. We're working on a 1.45.1 patch release with a couple things right now. In the meantime, are you in any position to be able to try the PR that is opened that purports to fix this (#5007)? (If you necessitate a Docker image or something, we could probably make that happen.) |
Thanks for the validation, @nathanmarcos. Just to set expectations, it'll probably be a Friday release with that above patch and probably one other smaller fix. |
No problem. That sounds good, thanks @abernix . 😉 |
Fix #5006 in #4883 we introduced a query hashing scheme that stays stable across schema updates if the update does not affect the query. Unfortunately, it was not taking introspection queries into account. This fixes the hashing mechanism to add the schema string to hashed data if we encounter an introspection field. This is a temporary fix until we move introspection execution out of query planning. At that point, this hashing mechanism won't ever see introspection fields.
This was released in https://github.com/apollographql/router/releases/tag/v1.45.1 via #5007. Note that we also brought in another (more critical) hashing fix to that release. |
Describe the bug
Starting from version
1.44.0
, up to latest1.45.0
, the introspection query is not returning new parts of the schema when persisting the query plan on Redis and router is using a supergraph from a file.To Reproduce
Steps to reproduce the behavior:
docker run --rm -d -p 6379:6379 redis
1.44.0
or1.45.0
as following:APOLLO_KEY="..." APOLLO_GRAPH_REF="..." APOLLO_ROUTER_SUPERGRAPH_PATH="examples/graphql/supergraph.graphql" APOLLO_ROUTER_CONFIG_PATH="router.yaml" cargo run -- --dev
http://127.0.0.1:4000/
and make sure schema polling is onexamples/graphql/supergraph.graphql
and save the filePS: If you manually delete the entry on Redis for the
plan:v2.7.2:06402fd188...
that contains the{"Ok":{"Response":{"response":{"data":{"__schema":{"queryType":{"name":"Query"},"...
, a new entry will be created and the new schema will immediately be delivered and the new query will be visible on sandbox.Expected behavior
Router should serve via introspection all schema changes after a reload or hot reload even when the query plan is being persisted on Redis.
Desktop (please complete the following information):
Additional context
Router version:
1.44.0
or1.45.0
The text was updated successfully, but these errors were encountered: