-
Notifications
You must be signed in to change notification settings - Fork 257
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
base: main
Are you sure you want to change the base?
docs: link directive #3202
Conversation
|
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 2 changed, 0 removed
Build ID: e9a3f8264f5cd82887c57744 URL: https://www.apollographql.com/docs/deploy-preview/e9a3f8264f5cd82887c57744 |
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. |
There was a problem hiding this 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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
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: |
Clarify required
@link
directive for Fed 2