Skip to content

Commit 9b6aeaa

Browse files
docs: update minVersion usage (#3270)
Uses the new `MinVersionBadge` component and makes syntax consistent. --------- Co-authored-by: Liz Hennessy <[email protected]>
1 parent b26794c commit 9b6aeaa

File tree

5 files changed

+25
-71
lines changed

5 files changed

+25
-71
lines changed

docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,9 @@ type Product @key(fields: "id") {
104104
In this modification of the previous example, `size` and `weight` are now subfields of a `ProductDimensions` object.
105105
The Products and Shipping subgraphs must both define the `ProductDimensions` type for this to be valid.
106106

107-
<MinVersion version="2.1.2">
108-
109107
### Using `@requires` with fields that take arguments
110108

111-
</MinVersion>
109+
<MinVersionBadge version="Federation v2.1.2" />
112110

113111
Starting in Federation v2.1.2, the `@requires` directive can include fields that take arguments, like so:
114112

docs/source/schema-design/federated-schemas/entities/interfaces.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Entity Interfaces
33
subtitle: Add entity fields polymorphically
44
description: Discover how to efficiently add polymorphic fields to GraphQL interfaces using Apollo Federation's Entity Interfaces and the @interfaceObject directive.
5-
minVersion: 2.3
5+
minVersion: Federation v2.3
66
---
77

88
Apollo Federation provides powerful extensions to GraphQL interfaces, specifically for use with your supergraph's [entities](/graphos/get-started/guides/federate-schemas#entity-overview):

docs/source/schema-design/federated-schemas/entities/migrate-fields.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,9 @@ type Bill @key(fields: "id") {
156156

157157
After you deploy the Billing subgraph and publish this final schema change, you've migrated `Bill.amount` to the Billing subgraph with zero downtime.
158158

159-
<MinVersion version="2.7">
160-
161159
## Incremental migration with progressive `@override`
162160

163-
</MinVersion>
161+
<MinVersionBadge version="Federation v2.7" />
164162

165163
<ProgressiveOverrideEnterprise/>
166164

docs/source/schema-design/federated-schemas/entities/use-contexts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Use contexts to share data
33
subtitle: Share data along type hierarchies without overloading @keys
44
description: Use the @context and @fromContext directives to enable a subgraph to share fields. These directives define contexts that enable data sharing along type hierarchies.
5-
minVersion: 2.8
5+
minVersion: Federation v2.8
66
---
77

88
<EnterpriseFeature>

docs/source/schema-design/federated-schemas/reference/directives.mdx

Lines changed: 21 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ As shown, custom namespace prefixes also end in two underscores.
7676

7777
## Managing schemas
7878

79-
<MinVersion version="2.0">
80-
8179
### The `@link` directive
8280

83-
</MinVersion>
81+
<MinVersionBadge version="Federation v2.0" />
8482

8583
```graphql
8684
directive @link(
@@ -99,11 +97,9 @@ For more information on `@link`, see the [official spec](https://specs.apollo.de
9997

10098
## Managing types
10199

102-
<MinVersion version="1.0">
103-
104100
### `@key`
105101

106-
</MinVersion>
102+
<MinVersionBadge version="Federation v1.0" />
107103

108104
```graphql
109105
directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE
@@ -202,11 +198,9 @@ The default value is `true`.
202198
</tbody>
203199
</table>
204200

205-
<MinVersion version="2.3">
206-
207201
### `@interfaceObject`
208202

209-
</MinVersion>
203+
<MinVersionBadge version="Federation v2.3" />
210204

211205
```graphql
212206
directive @interfaceObject on OBJECT
@@ -218,11 +212,9 @@ During composition, the fields of every `@interfaceObject` are added both to the
218212

219213
[Learn more about entity interfaces.](/graphos/schema-design/federated-schemas/entities/interfaces/)
220214

221-
<MinVersion version="1.0">
222-
223215
### `@extends`
224216

225-
</MinVersion>
217+
<MinVersionBadge version="Federation v1.0" />
226218

227219
```graphql
228220
directive @extends on OBJECT | INTERFACE
@@ -248,11 +240,9 @@ In Federation 1, every subgraph must extend the `Query` and `Mutation` types (if
248240

249241
## Managing shared fields
250242

251-
<MinVersion version="2.0">
252-
253243
### `@shareable`
254244

255-
</MinVersion>
245+
<MinVersionBadge version="Federation v2.0" />
256246

257247
```graphql
258248
directive @shareable repeatable on FIELD_DEFINITION | OBJECT
@@ -296,11 +286,9 @@ See also [Value types in Apollo Federation](/graphos/schema-design/federated-sch
296286

297287
The `@shareable` directive is about indicating when an object field can be resolved by multiple subgraphs. As interface fields are not directly resolved (their implementation is), `@shareable` is not meaningful on an interface field and is not allowed (at least since federation 2.2; earlier versions of federation 2 mistakenly ignored `@shareable` on interface fields).
298288

299-
<MinVersion version="2.0">
300-
301289
### `@inaccessible`
302290

303-
</MinVersion>
291+
<MinVersionBadge version="Federation v2.0" />
304292

305293
```graphql
306294
directive @inaccessible on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION
@@ -349,11 +337,9 @@ If a type is marked `@inaccessible`, all fields that return that type must also
349337

350338
For more information, see [Using `@inaccessible`](/graphos/schema-design/federated-schemas/sharing-types/#using-inaccessible).
351339

352-
<MinVersion version="2.0">
353-
354340
### `@override`
355341

356-
</MinVersion>
342+
<MinVersionBadge version="Federation v2.0" />
357343

358344
```graphql
359345
directive @override(from: String!) on FIELD_DEFINITION
@@ -389,11 +375,9 @@ Only one subgraph can `@override` any given field. If multiple subgraphs attempt
389375

390376
For more information, see [Migrating entity and root fields](/graphos/schema-design/federated-schemas/entities/migrate-fields).
391377

392-
<MinVersion version="2.7">
393-
394378
#### Progressive `@override`
395379

396-
</MinVersion>
380+
<MinVersionBadge version="Federation v2.7" />
397381

398382
<ProgressiveOverrideEnterprise/>
399383

@@ -459,11 +443,9 @@ This argument is available in Apollo Federation 2.7 and later. It is an [Enterpr
459443

460444
## Controlling access
461445

462-
<MinVersion version="2.5">
463-
464446
### `@authenticated`
465447

466-
</MinVersion>
448+
<MinVersionBadge version="Federation v2.5" />
467449

468450
<EnterpriseDirective />
469451

@@ -479,11 +461,9 @@ directive @authenticated on
479461

480462
Indicates to composition that the target element is accessible only to the authenticated supergraph users. For more granular access control, see the [`@requiresScopes`](#requiresScopes) directive below. Refer to the [router article](/graphos/routing/security/authorization#authenticated) for additional details.
481463

482-
<MinVersion version="2.5">
483-
484464
### `@requiresScopes`
485465

486-
</MinVersion>
466+
<MinVersionBadge version="Federation v2.5" />
487467

488468
<EnterpriseDirective />
489469

@@ -528,11 +508,9 @@ Indicates to composition that the target element is accessible only to the authe
528508
</tbody>
529509
</table>
530510

531-
<MinVersion version="2.6">
532-
533511
### `@policy`
534512

535-
</MinVersion>
513+
<MinVersionBadge version="Federation v2.6" />
536514

537515
<EnterpriseDirective />
538516

@@ -579,11 +557,9 @@ Indicates to composition that the target element is restricted based on authoriz
579557

580558
## Referencing external fields
581559

582-
<MinVersion version="1.0">
583-
584560
### `@external`
585561

586-
</MinVersion>
562+
<MinVersionBadge version="Federation v1.0" />
587563

588564
```graphql
589565
directive @external on FIELD_DEFINITION | OBJECT
@@ -617,11 +593,9 @@ type Position @external {
617593
}
618594
```
619595

620-
<MinVersion version="1.0">
621-
622596
### `@provides`
623597

624-
</MinVersion>
598+
<MinVersionBadge version="Federation v1.0" />
625599

626600
```graphql
627601
directive @provides(fields: FieldSet!) on FIELD_DEFINITION
@@ -698,11 +672,9 @@ Examples:
698672
</tbody>
699673
</table>
700674

701-
<MinVersion version="1.0">
702-
703675
### `@requires`
704676

705-
</MinVersion>
677+
<MinVersionBadge version="Federation v1.0" />
706678

707679
```graphql
708680
directive @requires(fields: FieldSet!) on FIELD_DEFINITION
@@ -767,11 +739,9 @@ Examples:
767739

768740
## Applying metadata
769741

770-
<MinVersion version="1.1">
771-
772742
### `@tag`
773743

774-
</MinVersion>
744+
<MinVersionBadge version="Federation v1.1" />
775745

776746
```graphql
777747
directive @tag(name: String!) repeatable on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION | SCHEMA
@@ -845,11 +815,9 @@ type Employee implements User @tag(name: "team-admin") {
845815

846816
## Managing custom directives
847817

848-
<MinVersion version="2.1">
849-
850818
### `@composeDirective`
851819

852-
</MinVersion>
820+
<MinVersionBadge version="Federation v2.1" />
853821

854822
```graphql
855823
directive @composeDirective(name: String!) repeatable on SCHEMA
@@ -923,11 +891,9 @@ If different subgraphs use different versions of a directive's corresponding spe
923891

924892
## Saving and referencing data with contexts
925893

926-
<MinVersion version="2.8">
927-
928894
### `@context`
929895

930-
</MinVersion>
896+
<MinVersionBadge version="Federation v2.8" />
931897

932898
<EnterpriseFeature />
933899

@@ -958,11 +924,9 @@ type U @key(fields: "id") {
958924
}
959925
```
960926

961-
<MinVersion version="2.8">
962-
963927
### `@fromContext`
964928

965-
</MinVersion>
929+
<MinVersionBadge version="Federation v2.8" />
966930

967931
<EnterpriseFeature />
968932

@@ -990,11 +954,9 @@ For examples using `@context` and `@fromContext`, see [Using contexts to share d
990954

991955
## Customizing demand controls
992956

993-
<MinVersion version="2.9">
994-
995957
### `@cost`
996958

997-
</MinVersion>
959+
<MinVersionBadge version="Federation v2.9" />
998960

999961
<EnterpriseFeature />
1000962

@@ -1039,11 +1001,9 @@ Regardless of whether `@cost` is specified on a field, the field cost for that f
10391001
</tbody>
10401002
</table>
10411003

1042-
<MinVersion version="2.9">
1043-
10441004
### `@listSize`
10451005

1046-
</MinVersion>
1006+
<MinVersionBadge version="Federation v2.9" />
10471007

10481008
<EnterpriseFeature />
10491009

@@ -1199,11 +1159,9 @@ The default value is `true`.
11991159
</tbody>
12001160
</table>
12011161

1202-
<MinVersion version="2.10">
1203-
12041162
## Connectors
12051163

1206-
</MinVersion>
1164+
<MinVersionBadge version="Federation v2.10" />
12071165

12081166
<EnterpriseFeature />
12091167

0 commit comments

Comments
 (0)