Skip to content

Conversation

jdolle
Copy link
Collaborator

@jdolle jdolle commented Oct 3, 2025

🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.

Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request.

Description

@graphql-tools/import is missing support for newer federation features.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@jdolle jdolle requested a review from ardatan October 3, 2025 17:15
@jdolle jdolle self-assigned this Oct 3, 2025
Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: 9570d1f

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

This PR includes changesets to release 3 packages
Name Type
@graphql-tools/import Patch
@graphql-tools/graphql-file-loader Patch
@graphql-tools/node-require 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

Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Expanded GraphQL Federation import support to cover v2.10, enabling recognition of additional federation directives and fields.
    • Added import compatibility for directives such as: authenticated, requiresScopes, policy, context, fromContext, cost, listSize, connect, and source.
    • Restored and versioned support for composeDirective and interfaceObject within the federation import set.
  • Chores

    • Added a changeset entry indicating a patch release for the updated federation import support.

Walkthrough

Updates the import package to expand recognized Federation v2.x directives and fields in packages/import/src/index.ts, including version-annotated additions. Also adds a changeset entry marking a patch-level release for importing support.

Changes

Cohort / File(s) Summary
Release metadata
\.changeset/yummy-phones-punch.md
Adds a patch changeset noting expanded importing support for Federation v2.10 via @graphql-tools/import.
Import package: federation imports
packages/import/src/index.ts
Adjusts federationImports: reorders/removes then re-adds @composeDirective (v2.1) and @interfaceObject (v2.3); adds new v2.x directives/fields: @authenticated, @requiresScopes, @Policy, @context, @fromcontext, @cost, @listsize, @connect, @source with version comments.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ardatan

Poem

In burrows of code, I twitch my nose,
New federations bloom where the schema grows.
Little directives hop into the list,
Versioned footprints no line has missed.
Patch-sized nibble, big hop ahead—
Import trails widened for rabbits to tread. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed The pull request description explains that @graphql-tools/import was missing support for newer federation features and identifies this as a new feature addition, which aligns with the changeset adding federation v2.10 directives.
Title Check ✅ Passed The title succinctly describes the primary change of adding import support for federation v2.10 in the @graphql-tools/import package, directly reflecting the core update introduced by this pull request. It is clear, focused, and free of unnecessary detail, allowing reviewers to immediately understand the main feature being added.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch federation-2-10-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

github-actions bot commented Oct 3, 2025

💻 Website Preview

The latest changes are available as preview in: https://pr-7545.graphql-tools.pages.dev

@jdolle jdolle changed the title feat: add import support for federation v2.10 import support for federation v2.10 Oct 3, 2025
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.

1 participant