You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
First, 🌠 thank you 🌠 for taking the time to consider a contribution to
Apollo!
Here are some important details to follow:
* ⏰ Your time is important
To save your precious time, if the contribution you are making will
take more than an hour, please make sure it has been discussed in an
issue first. This is especially true for feature requests!
* 💡 Features
Feature requests can be created and discussed within a GitHub Issue.
Be sure to search for existing feature requests (and related issues!)
prior to opening a new request. If an existing issue covers the need,
please upvote that issue by using the 👍 emote, rather than opening a
new issue.
* 🕷 Bug fixes
These can be created and discussed in this repository. When fixing a
bug,
please _try_ to add a test which verifies the fix. If you cannot, you
should
still submit the PR but we may still ask you (and help you!) to create a
test.
* Federation versions
Please make sure you're targeting the federation version you're opening
the PR for. Federation 2 (alpha) is currently located on the `main`
branch and prior versions of Federation live on the `version-0.x`
branch.
* 📖 Contribution guidelines
Follow
https://github.com/apollographql/federation/blob/HEAD/CONTRIBUTING.md
when submitting a pull request. Make sure existing tests still pass, and
add
tests for all new behavior.
* ✏️ Explain your pull request
Describe the big picture of your changes here to communicate to what
your pull request is meant to accomplish. Provide 🔗 links 🔗 to
associated issues!
We hope you will find this to be a positive experience! Open source
contribution can be intimidating and we hope to alleviate that pain as
much
as possible. Without following these guidelines, you may be missing
context
that can help you succeed with your contribution, which is why we
encourage
discussion first. Ultimately, there is no guarantee that we will be able
to
merge your pull-request, but by following these guidelines we can try to
avoid disappointment.
-->
Updates documentation to reflect feature tiering changes made in the
[recent router
release](https://github.com/apollographql/router/releases/tag/v2.6.0).
References:
- [Product's feature tiering
matrix](https://docs.google.com/document/d/13wh3NBmBnSPKBCH1f19eir-caWbz6Y9wKEHItXq6l1c/edit?tab=t.7kwmpu4gs3p#heading=h.37ncslwgnmfs)
- [Additional feedback from
product](https://docs.google.com/document/d/1ea30pyaIAaBg4xTUXuUDDa3w16fhhR7KvEm3QQNE-D8/edit?tab=t.pyvj315sx3ne#heading=h.gx3p2h7ez2ov)
### Testing
Ran the docs site locally using `librarian.local.config.mts` file with
override for the `federation` repository.
Specifically, the following pages were checked:
- http://localhost:3000/docs/graphos/connectors/reference/directives
-
http://localhost:3000/docs/graphos/schema-design/federated-schemas/entities/use-contexts
-
http://localhost:3000/docs/graphos/schema-design/federated-schemas/entities/migrate-fields#incremental-migration-with-progressive-override
As your supergraph grows, you might want to move parts of one subgraph to another subgraph.
10
8
For example, suppose your Payments subgraph defines a `Bill` entity:
11
9
@@ -160,8 +158,6 @@ After you deploy the Billing subgraph and publish this final schema change, you'
160
158
161
159
<MinVersionBadge version="Federation v2.7" />
162
160
163
-
<ProgressiveOverrideEnterprise/>
164
-
165
161
Follow these steps to incrementally migrate a field from one subgraph to another.
166
162
These steps use the `amount` field in the example Payments and Billing subgraphs described at the top of the page, but you can them with any entity field(s).
Copy file name to clipboardExpand all lines: docs/source/schema-design/federated-schemas/entities/use-contexts.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,6 @@ description: Use the @context and @fromContext directives to enable a subgraph t
5
5
minVersion: Federation v2.8
6
6
---
7
7
8
-
<EnterpriseFeature>
9
-
10
-
The `@context` and `@fromContext` directives are [Enterprise features](https://www.apollographql.com/pricing) of the Apollo Router and require an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). If your organization doesn't have an Enterprise plan, you can test it out by signing up for a free [Enterprise trial](https://studio.apollographql.com/signup?referrer=docs).
11
-
12
-
</EnterpriseFeature>
13
-
14
8
In an entity, a nested object may have a dependency on an ancestor type and thus need access to that ancestor's field(s).
15
9
16
10
To enable a descendant to access an ancestor's field, you could add it as a `@key` field to every entity along the chain of nested types, but that can become problematic. Deeply nested types can change the `@key` fields of many entities. The added field may be irrelevant to the entities it's added to. Most importantly, overloading `@key` fields often breaks the separation of concerns between different subgraphs.
Apollo Federation defines a collection of directives that you use in your subgraph schemas to enable certain features.
@@ -379,8 +379,6 @@ For more information, see [Migrating entity and root fields](/graphos/schema-des
379
379
380
380
<MinVersionBadge version="Federation v2.7" />
381
381
382
-
<ProgressiveOverrideEnterprise/>
383
-
384
382
Rolling out any change to a production subgraph, including field migration, risks degrading the performance of your graph. Rerouting all traffic from one subgraph to another all at once could overload the overriding subgraph.
385
383
386
384
The _progressive `@override`_ feature enables the gradual, progressive deployment of a subgraph with an `@override` field. As a subgraph developer, you can customize the percentage of traffic that the overriding and overridden subgraphs each resolve for a field. You apply a label to an `@override` field to set the percentage of traffic for the field that should be resolved by the overriding subgraph, with the remaining percentage resolved by the overridden subgraph. You can then monitor the performance of the subgraphs in Studio, resolve any issues, and iteratively and progressively increase the percentage until all traffic is resolved by the overriding subgraph.
@@ -426,12 +424,6 @@ To learn more, see the [Incremental migration with `@override`](/graphos/schema-
426
424
</td>
427
425
<td>
428
426
429
-
<EnterpriseFeature>
430
-
431
-
This argument is available in Apollo Federation 2.7 and later. It is an [Enterprise feature](https://www.apollographql.com/pricing) of the GraphOS Router and requires an organization with a [GraphOS Enterprise plan](https://www.apollographql.com/pricing/). You can test it out by signing up for a free [Enterprise trial](https://studio.apollographql.com/signup?referrer=docs).
432
-
433
-
</EnterpriseFeature>
434
-
435
427
**Optional.** A string of arbitrary arguments. Supported in this release:
436
428
- `percent(<percent-value>)` - The percentage of traffic for the field that's resolved by this subgraph. The remaining percentage is resolved by the other ([from](#from)) subgraph. To learn more, see [Incremental migration with `@override`](/graphos/schema-design/federated-schemas/entities/migrate-fields#incremental-migration-with-progressive-override).
437
429
@@ -447,7 +439,7 @@ This argument is available in Apollo Federation 2.7 and later. It is an [Enterpr
447
439
448
440
<MinVersionBadge version="Federation v2.5" />
449
441
450
-
<EnterpriseDirective />
442
+
<LicensedDirective />
451
443
452
444
453
445
```graphql
@@ -465,7 +457,7 @@ Indicates to composition that the target element is accessible only to the authe
465
457
466
458
<MinVersionBadge version="Federation v2.5" />
467
459
468
-
<EnterpriseDirective />
460
+
<LicensedDirective />
469
461
470
462
```graphql
471
463
directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
@@ -895,8 +887,6 @@ If different subgraphs use different versions of a directive's corresponding spe
895
887
896
888
<MinVersionBadge version="Federation v2.8" />
897
889
898
-
<EnterpriseFeature />
899
-
900
890
The `@context` directive defines a named context from which a field of the annotated type can be passed to a receiver of the context. The receiver must be a field annotated with the `@fromContext` directive.
901
891
902
892
```graphql
@@ -928,8 +918,6 @@ type U @key(fields: "id") {
928
918
929
919
<MinVersionBadgeversion="Federation v2.8" />
930
920
931
-
<EnterpriseFeature />
932
-
933
921
The `@fromContext` directivesetsthecontextfromwhichtoreceivethevalueoftheannotatedfield. Thecontextmusthavebeendefinedwiththe `@context` directive.
934
922
935
923
```graphql
@@ -958,7 +946,7 @@ For examples using `@context` and `@fromContext`, see [Using contexts to share d
0 commit comments