Skip to content

fix: fix demand control validations#3336

Merged
dariuszkuc merged 4 commits intoversion-2.11from
fix_cost_validations
Nov 12, 2025
Merged

fix: fix demand control validations#3336
dariuszkuc merged 4 commits intoversion-2.11from
fix_cost_validations

Conversation

@dariuszkuc
Copy link
Member

@listSize validations were not correctly unwrapping non-nullable composite types and fields.

@dariuszkuc dariuszkuc requested a review from a team as a code owner November 11, 2025 16:33
@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2025

🦋 Changeset detected

Latest commit: 6757825

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

This PR includes changesets to release 7 packages
Name Type
@apollo/federation-internals Patch
@apollo/gateway Patch
@apollo/composition Patch
@apollo/query-planner 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

@apollo-librarian
Copy link

apollo-librarian bot commented Nov 11, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 725050a2af617fba4eb5035e
Build Logs: View logs

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 11, 2025

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.

`@listSize` validations were not correctly unwrapping non-nullable composite types and fields.
@tninesling
Copy link
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

@dariuszkuc dariuszkuc merged commit 3e2d1fd into version-2.11 Nov 12, 2025
17 checks passed
@dariuszkuc dariuszkuc deleted the fix_cost_validations branch November 12, 2025 04:46
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants