apollographql / router

A configurable, high-performance routing runtime for Apollo Federation 🚀
https://www.apollographql.com/docs/router/
Other
813 stars 272 forks source link

Allow non-trivial root __typename-only queries when introspection is disabled #6282

Open SimonSapin opened 3 days ago

SimonSapin commented 3 days ago

Even though we use the same executor as for schema introspection, queries that only use __typename should not be rejected when schema introspection is disabled.

Also fixes https://github.com/apollographql/router/issues/6154: these tests were using #[should_panic] without an expected message. At some point the underlying bug was fixed but these tests still panicked for a different reason, so we didn’t notice at the time.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

Exceptions

Note any exceptions here

Notes

[^1]: It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. [^2]: Configuration is an important part of many changes. Where applicable please try to document configuration examples. [^3]: Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

svc-apollo-docs commented 3 days ago

✅ Docs Preview Ready

No new or changed pages found.

github-actions[bot] commented 3 days ago

@SimonSapin, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

router-perf[bot] commented 3 days ago

CI performance tests

SimonSapin commented 3 days ago

I’ve tweaked the execution logic and rephrased the PR title and description, please take another look