Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed a regression created by PR #2967 #2982

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

duckki
Copy link
Contributor

@duckki duckki commented Apr 16, 2024

  • Previously, directives applied on operations weren't properly attached to their parent elements.
  • Changed the Operation class to inherit from DirectiveTargetElement class, which attaches directives properly.

Related: #2961

@duckki duckki self-assigned this Apr 16, 2024
@duckki duckki requested a review from a team as a code owner April 16, 2024 21:49
Copy link

changeset-bot bot commented Apr 16, 2024

⚠️ No Changeset found

Latest commit: 58c1161

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

netlify bot commented Apr 16, 2024

👷 Deploy request for apollo-federation-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 58c1161

Copy link

codesandbox-ci bot commented Apr 16, 2024

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.

@duckki duckki force-pushed the duckki/fix-pr-2961-regression branch from 07724a3 to 3d33a11 Compare April 16, 2024 21:55
const queryPlan = qp.buildQueryPlan(op);
const fetch_nodes = findFetchNodes(subgraph1.name, queryPlan.node);
expect(fetch_nodes).toHaveLength(1);
// Note: The query is expected to carry the `@operation` directive.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that's an old comment from previous test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you are right. Let me clean it up.

@duckki duckki force-pushed the duckki/fix-pr-2961-regression branch from 3d33a11 to 74b0226 Compare April 16, 2024 22:18
@duckki
Copy link
Contributor Author

duckki commented Apr 16, 2024

Thanks @dariuszkuc! I'll work with security on the semgrep failures.

@duckki duckki force-pushed the duckki/fix-pr-2961-regression branch from a35b079 to 6d4be86 Compare April 17, 2024 00:08
- Previously, directives applied on operations weren't properly attached to their parent elements.
- Changed the `Operation` class to inherit from `DirectiveTargetElement` class, which attaches directives properly.

Related: apollographql#2961
- cleaned up the comment in the test
@duckki duckki force-pushed the duckki/fix-pr-2961-regression branch from 6d4be86 to 58c1161 Compare April 17, 2024 00:23
@duckki duckki merged commit f0f89ed into apollographql:main Apr 17, 2024
15 checks passed
@o0Ignition0o
Copy link
Contributor

o0Ignition0o commented Apr 17, 2024

I'm gonna add a changeset entry with

---
"@apollo/query-planner": patch
"@apollo/federation-internals": patch
---

So we can kick off a new release

o0Ignition0o added a commit that referenced this pull request Apr 17, 2024
dariuszkuc pushed a commit that referenced this pull request Apr 17, 2024
o0Ignition0o pushed a commit that referenced this pull request Apr 22, 2024
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 main, this PR will
be updated.


# Releases
## @apollo/composition@2.7.4

### Patch Changes

- Updated dependencies
\[[`d80b7f0ca1456567a0866a32d2b2abf940598f77`](d80b7f0)]:
    -   @apollo/federation-internals@2.7.4
    -   @apollo/query-graphs@2.7.4

## @apollo/gateway@2.7.4

### Patch Changes

- Updated dependencies
\[[`d80b7f0ca1456567a0866a32d2b2abf940598f77`](d80b7f0),
[`c89d8287e88d12cfd34c1baf1f42db672731b8a7`](c89d828)]:
    -   @apollo/query-planner@2.7.4
    -   @apollo/federation-internals@2.7.4
    -   @apollo/composition@2.7.4

## @apollo/federation-internals@2.7.4

### Patch Changes

- Fixed a regression created by PR (#2967), where directives would not
be properly attached to their parent. (#2982)
([#2984](#2984))

## @apollo/query-graphs@2.7.4

### Patch Changes

- Updated dependencies
\[[`d80b7f0ca1456567a0866a32d2b2abf940598f77`](d80b7f0)]:
    -   @apollo/federation-internals@2.7.4

## @apollo/query-planner@2.7.4

### Patch Changes

- Fixed a regression created by PR (#2967), where directives would not
be properly attached to their parent. (#2982)
([#2984](#2984))

- Ensure query variables used in the directives applied at the operation
level are retained in subgraph queries (#2986)
([#2986](#2986))

- Updated dependencies
\[[`d80b7f0ca1456567a0866a32d2b2abf940598f77`](d80b7f0)]:
    -   @apollo/federation-internals@2.7.4
    -   @apollo/query-graphs@2.7.4

## @apollo/subgraph@2.7.4

### Patch Changes

- Updated dependencies
\[[`d80b7f0ca1456567a0866a32d2b2abf940598f77`](d80b7f0)]:
    -   @apollo/federation-internals@2.7.4

## apollo-federation-integration-testsuite@2.7.4

Co-authored-by: github-actions[bot] <github-actions[bot]@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.

None yet

3 participants