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

docs: link directive #3202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

docs: link directive #3202

wants to merge 1 commit into from

Conversation

shorgi
Copy link
Contributor

@shorgi shorgi commented Jan 16, 2025

Clarify required @link directive for Fed 2

Copy link

changeset-bot bot commented Jan 16, 2025

⚠️ No Changeset found

Latest commit: b2e7b0c

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

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Jan 16, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 2 changed, 0 removed
* graphos/reference/federation/directives.mdx
* graphos/reference/federation/subgraph-spec.mdx

Build ID: e9a3f8264f5cd82887c57744

URL: https://www.apollographql.com/docs/deploy-preview/e9a3f8264f5cd82887c57744

Copy link

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.

@shorgi shorgi marked this pull request as ready for review January 16, 2025 17:59
@shorgi shorgi requested a review from a team as a code owner January 16, 2025 17:59
@shorgi shorgi requested a review from dariuszkuc January 16, 2025 18:00
Copy link
Contributor

@Meschreiber Meschreiber left a comment

Choose a reason for hiding this comment

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

Thanks for tackling so quickly!

@@ -0,0 +1,13 @@
Subgraph schemas "opt in" to Federation v2 features by applying the `@link` directive to the `schema` type. The `import` list of this definition must include each federation-specific directive that the subgraph schema uses. In the example below, the schema uses the `@key` and `@shareable` directives:
Copy link
Contributor

@Meschreiber Meschreiber Jan 16, 2025

Choose a reason for hiding this comment

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

Not sure if "opt in" requires the quotes, but I'm a minimalist when it comes to characters like " and ( so take that with a grain of salt. :P

@@ -0,0 +1,13 @@
Subgraph schemas "opt in" to Federation v2 features by applying the `@link` directive to the `schema` type. The `import` list of this definition must include each federation-specific directive that the subgraph schema uses. In the example below, the schema uses the `@key` and `@shareable` directives:
Copy link
Member

@dariuszkuc dariuszkuc Jan 17, 2025

Choose a reason for hiding this comment

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

The import list of this definition must include

Imports are optional and it is perfectly fine to skip it. Side effect is that without explicit imports those directives have to be namespaced to the spec (or provided alias), i.e. @key becomes @federation__key without explicit import

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @dariuszkuc, do these edits make sense:

Suggested change
Subgraph schemas "opt in" to Federation v2 features by applying the `@link` directive to the `schema` type. The `import` list of this definition must include each federation-specific directive that the subgraph schema uses. In the example below, the schema uses the `@key` and `@shareable` directives:
Subgraph schemas opt in to Federation v2 features by applying the `@link` directive to the `schema` type. You can optionally add an `import` list to this definition to include each federation-specific directive that the subgraph schema uses. In the example below, the schema uses the `@key` and `@shareable` directives:

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