fix: fix demand control validations#3336
Merged
dariuszkuc merged 4 commits intoversion-2.11from Nov 12, 2025
Merged
Conversation
🦋 Changeset detectedLatest commit: 6757825 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 725050a2af617fba4eb5035e |
|
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. |
tninesling
approved these changes
Nov 11, 2025
`@listSize` validations were not correctly unwrapping non-nullable composite types and fields.
Contributor
|
Does this also need to go to main/next? I don't think this changed in 2.11, so it might have been a bug since 2.9 |
briannafugate408
approved these changes
Nov 11, 2025
ba01afb to
93a4bfe
Compare
duckki
approved these changes
Nov 12, 2025
dariuszkuc
pushed a commit
that referenced
this pull request
Nov 12, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to version-2.11, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `version-2.11` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `version-2.11`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @apollo/composition@2.11.5-preview.1 ### Patch Changes - Updated dependencies \[[`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5-preview.1 - @apollo/query-graphs@2.11.5-preview.1 ## @apollo/gateway@2.11.5-preview.1 ### Patch Changes - Updated dependencies \[[`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5-preview.1 - @apollo/composition@2.11.5-preview.1 - @apollo/query-planner@2.11.5-preview.1 ## @apollo/federation-internals@2.11.5-preview.1 ### Patch Changes - Fixed demand control validations to unwrap non-nullable composite types and fields when performing validations. ([#3336](#3336)) ## @apollo/query-graphs@2.11.5-preview.1 ### Patch Changes - Updated dependencies \[[`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5-preview.1 ## @apollo/query-planner@2.11.5-preview.1 ### Patch Changes - Updated dependencies \[[`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5-preview.1 - @apollo/query-graphs@2.11.5-preview.1 ## @apollo/subgraph@2.11.5-preview.1 ### Patch Changes - Updated dependencies \[[`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5-preview.1 ## apollo-federation-integration-testsuite@2.11.5-preview.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
dariuszkuc
added a commit
that referenced
this pull request
Nov 13, 2025
`@listSize` validations were not correctly unwrapping non-nullable composite types and fields.
dariuszkuc
added a commit
that referenced
this pull request
Nov 13, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to version-2.11, this PR will be updated. # Releases ## @apollo/composition@2.11.5 ### Patch Changes - Fixed access control verification of transitive requirements (through `@requires` and/or `@fromContext`) to ensure it works with chains of transitive dependencies. ([#3333](#3333)) - Allow interface object fields to specify access control ([#3333](#3333)) Update composition logic to allow specifying access control directives (`@authenticated`, `@requiresScopes` and `@policy`) on `@interfaceObject` fields. While we disallow access control on interface types and fields, we decided to support it on `@interfaceObject` as it is a useful pattern to define a single resolver (that may need access controls) for common interface fields. Alternative would require our users to explicitly define resolvers for all implementations which defeats the purpose of `@interfaceObject`. This PR refactors in how we propagate access control by providing additional merge sources when merging directives on interfaces, interface fields and object fields. - Updated dependencies \[[`e1c58611c3c996b4fff98a54e49f00549ff2115d`](e1c5861), [`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5 - @apollo/query-graphs@2.11.5 ## @apollo/gateway@2.11.5 ### Patch Changes - Updated dependencies \[[`5ee4d966487e714ae6bc6445bf53d75ccbbaf6ae`](5ee4d96), [`e1c58611c3c996b4fff98a54e49f00549ff2115d`](e1c5861), [`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/composition@2.11.5 - @apollo/federation-internals@2.11.5 - @apollo/query-planner@2.11.5 ## @apollo/federation-internals@2.11.5 ### Patch Changes - Allow interface object fields to specify access control ([#3333](#3333)) Update composition logic to allow specifying access control directives (`@authenticated`, `@requiresScopes` and `@policy`) on `@interfaceObject` fields. While we disallow access control on interface types and fields, we decided to support it on `@interfaceObject` as it is a useful pattern to define a single resolver (that may need access controls) for common interface fields. Alternative would require our users to explicitly define resolvers for all implementations which defeats the purpose of `@interfaceObject`. This PR refactors in how we propagate access control by providing additional merge sources when merging directives on interfaces, interface fields and object fields. - Fixed demand control validations to unwrap non-nullable composite types and fields when performing validations. ([#3336](#3336)) ## @apollo/query-graphs@2.11.5 ### Patch Changes - Updated dependencies \[[`e1c58611c3c996b4fff98a54e49f00549ff2115d`](e1c5861), [`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5 ## @apollo/query-planner@2.11.5 ### Patch Changes - Updated dependencies \[[`e1c58611c3c996b4fff98a54e49f00549ff2115d`](e1c5861), [`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5 - @apollo/query-graphs@2.11.5 ## @apollo/subgraph@2.11.5 ### Patch Changes - Updated dependencies \[[`e1c58611c3c996b4fff98a54e49f00549ff2115d`](e1c5861), [`3e2d1fd315db54a089fedf131cfaa27792bdd049`](3e2d1fd)]: - @apollo/federation-internals@2.11.5 ## apollo-federation-integration-testsuite@2.11.5 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dariuszkuc <9501705+dariuszkuc@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@listSizevalidations were not correctly unwrapping non-nullable composite types and fields.