apollographql / federation

🌐  Build and scale a single data graph across multiple services with Apollo's federation gateway.
https://apollographql.com/docs/federation/
Other
669 stars 254 forks source link

fix: normalize field set selection #3162

Closed dariuszkuc closed 1 month ago

dariuszkuc commented 1 month ago

FieldSet scalar represents a selection set without outer braces. This means that users could potentially specify some selections that could be normalized (i.e. eliminate duplicate field selections, hoist/collapse unnecessary inline fragments, etc). Previously we were using @requires field set selection AS-IS for edge conditions. With this change we will now normalize the FieldSet selections before using them as fetch node conditions.

svc-apollo-docs commented 1 month ago

✅ Docs Preview Ready

Configuration ```json { "repoOverrides": { "apollographql/federation@main": { "remote": { "owner": "apollographql", "repo": "federation", "branch": "normalize_field_set" } } } } ```
Name Link
Commit 65a92e6942cd05ac4e707cf61242d940bd522cfb
Preview [https://www.apollographql.com/docs/deploy-preview/f18ee32f5da1e2cc8433](https://www.apollographql.com/docs/deploy-preview/f18ee32f5da1e2cc8433)
Build ID f18ee32f5da1e2cc8433
File Changes
0 new, 2 changed, 0 removed ``` * graphos/reference/federation/versions.mdx * graphos/routing/uplink.mdx ```
Pages 2

2 pages published. Build will be available for 30 days.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 65a92e6942cd05ac4e707cf61242d940bd522cfb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages | Name | Type | | --------------------------------------- | ----- | | @apollo/query-planner | Patch | | @apollo/federation-internals | Patch | | @apollo/gateway | Patch | | @apollo/composition | Patch | | @apollo/query-graphs | Patch | | @apollo/subgraph | Patch | | apollo-federation-integration-testsuite | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 1 month ago

Deploy Preview for apollo-federation-docs canceled.

Name Link
Latest commit 65a92e6942cd05ac4e707cf61242d940bd522cfb
Latest deploy log https://app.netlify.com/sites/apollo-federation-docs/deploys/66ff7efdd52e890008fc667d
codesandbox-ci[bot] commented 1 month ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.