diff --git a/docs/en/src/apollo_federation.md b/docs/en/src/apollo_federation.md index 6376185d..ac03643a 100644 --- a/docs/en/src/apollo_federation.md +++ b/docs/en/src/apollo_federation.md @@ -16,6 +16,8 @@ - The `inaccessible` directive is used to indicate that a location in the schema cannot be queried at the supergraph level, but can still be queried at the subgraph level. +- The `tag` directive is used to provide a mechanism for applying arbitrary string metadata to the fields and types of a schema. Tags will be propagated up into composed supergraphs. + - The `override` directive is used to indicate that a field is now to be resolved by the current subgraph instead of the named subgraph. ## Entity lookup function diff --git a/src/docs/complex_object.md b/src/docs/complex_object.md index c97300c6..741abf18 100644 --- a/src/docs/complex_object.md +++ b/src/docs/complex_object.md @@ -17,6 +17,7 @@ some simple fields, and use the `ComplexObject` macro to define some other field | rename_args | Rename all the arguments according to the given case convention. The possible values are "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE". | string | Y | | guard | Field of guard *[See also the Book](https://async-graphql.github.io/async-graphql/en/field_guard.html)* | string | Y | | inaccessible | Indicate that an object is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Field attributes @@ -33,6 +34,7 @@ some simple fields, and use the `ComplexObject` macro to define some other field | requires | Annotate the required input fieldset from a base type for a resolver. It is used to develop a query plan where the required fields may not be needed by the client, but the service may need additional information from other services. | string | Y | | shareable | Indicate that a field is allowed to be resolved by multiple subgraphs | bool | Y | | inaccessible | Indicate that a field is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | override_from | Mark the field as overriding a field currently present on another subgraph. It is used to migrate fields between subgraphs. | string | Y | | guard | Field of guard *[See also the Book](https://async-graphql.github.io/async-graphql/en/field_guard.html)* | string | Y | | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | @@ -53,6 +55,7 @@ some simple fields, and use the `ComplexObject` macro to define some other field | default_with | Expression to generate default value | code string | Y | | validator | Input value validator *[See also the Book](https://async-graphql.github.io/async-graphql/en/input_value_validators.html)* | object | Y | | inaccessible | Indicate that a field argument is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | secret | Mark this field as a secret, it will not output the actual value in the log. | bool | Y | diff --git a/src/docs/enum.md b/src/docs/enum.md index 7957ea5e..00019b07 100644 --- a/src/docs/enum.md +++ b/src/docs/enum.md @@ -11,7 +11,8 @@ Define a GraphQL enum | remote | Derive a remote enum | string | Y | | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | -| inaccessible | Indicate that an enum is not accessible from a supergraph when using Apollo Federation | bool | Y | +| inaccessible | Indicate that an enum is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Item attributes @@ -23,6 +24,7 @@ Define a GraphQL enum | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | inaccessible | Indicate that an item is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Examples diff --git a/src/docs/input_object.md b/src/docs/input_object.md index c05c95ce..7d73ecbb 100644 --- a/src/docs/input_object.md +++ b/src/docs/input_object.md @@ -12,6 +12,7 @@ Define a GraphQL input object | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | concretes | Specify how the concrete type of the generic SimpleObject should be implemented. | ConcreteType | Y | | inaccessible | Indicate that an input object is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Field attributes @@ -30,6 +31,7 @@ Define a GraphQL input object | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | secret | Mark this field as a secret, it will not output the actual value in the log. | bool | Y | | inaccessible | Indicate that a field is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Examples diff --git a/src/docs/interface.md b/src/docs/interface.md index 2017c061..098822f5 100644 --- a/src/docs/interface.md +++ b/src/docs/interface.md @@ -14,6 +14,7 @@ Define a GraphQL interface | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | inaccessible | Indicate that an interface is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Field attributes @@ -33,6 +34,7 @@ Define a GraphQL interface | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | inaccessible | Indicate that a field is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Field argument attributes @@ -48,6 +50,7 @@ Define a GraphQL interface | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | secret | Mark this field as a secret, it will not output the actual value in the log. | bool | Y | | inaccessible | Indicate that an argument is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Define an interface diff --git a/src/docs/merged_object.md b/src/docs/merged_object.md index 57382bff..0aa0ceb5 100644 --- a/src/docs/merged_object.md +++ b/src/docs/merged_object.md @@ -13,6 +13,7 @@ Define a merged object with multiple object types. | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | serial | Resolve each field sequentially. | bool | Y | | inaccessible | Indicate that an object is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Examples diff --git a/src/docs/newtype.md b/src/docs/newtype.md index 762d2390..666dc5f7 100644 --- a/src/docs/newtype.md +++ b/src/docs/newtype.md @@ -12,6 +12,7 @@ It also implements `From` and `Into`. | visible(Only valid for new scalars) | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | specified_by_url(Only valid for new scalars) | Provide a specification URL for this scalar type, it must link to a human-readable specification of the data format, serialization and coercion rules for this scalar. | string | Y | | inaccessible | Indicate that an object is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Examples diff --git a/src/docs/object.md b/src/docs/object.md index 9d1ea211..60ace6ca 100644 --- a/src/docs/object.md +++ b/src/docs/object.md @@ -18,6 +18,7 @@ All methods are converted to camelCase. | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | inaccessible | Indicate that an object is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | serial | Resolve each field sequentially. | bool | Y | | concretes | Specify how the concrete type of the generic SimpleObject should be implemented. | ConcreteType | Y | | guard | Field of guard *[See also the Book](https://async-graphql.github.io/async-graphql/en/field_guard.html)* | string | Y | @@ -37,6 +38,7 @@ All methods are converted to camelCase. | requires | Annotate the required input fieldset from a base type for a resolver. It is used to develop a query plan where the required fields may not be needed by the client, but the service may need additional information from other services. | string | Y | | shareable | Indicate that a field is allowed to be resolved by multiple subgraphs | bool | Y | | inaccessible | Indicate that a field is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | override_from | Mark the field as overriding a field currently present on another subgraph. It is used to migrate fields between subgraphs. | string | Y | | guard | Field of guard *[See also the Book](https://async-graphql.github.io/async-graphql/en/field_guard.html)* | string | Y | | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | @@ -59,6 +61,7 @@ All methods are converted to camelCase. | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | inaccessible | Indicate that an argument is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | secret | Mark this field as a secret, it will not output the actual value in the log. | bool | Y | | key | Is entity key(for Federation) | bool | Y | | process_with | Upon successful parsing, invokes specified function. Its signature must be `fn(&mut T)`. | code path | Y | diff --git a/src/docs/scalar.md b/src/docs/scalar.md index e6a7418e..f7155be8 100644 --- a/src/docs/scalar.md +++ b/src/docs/scalar.md @@ -6,4 +6,5 @@ Define a Scalar |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------| | name | Scalar name | string | Y | | specified_by_url | Provide a specification URL for this scalar type, it must link to a human-readable specification of the data format, serialization and coercion rules for this scalar. | string | Y | -| inaccessible | Indicate that a scalar is not accessible from a supergraph when using Apollo Federation | bool | Y | \ No newline at end of file +| inaccessible | Indicate that a scalar is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | \ No newline at end of file diff --git a/src/docs/simple_object.md b/src/docs/simple_object.md index 13c129b7..82f49226 100644 --- a/src/docs/simple_object.md +++ b/src/docs/simple_object.md @@ -14,6 +14,7 @@ Similar to `Object`, but defined on a structure that automatically generates get | extends | Add fields to an entity that's defined in another service | bool | Y | | shareable | Indicate that an object type's field is allowed to be resolved by multiple subgraphs | bool | Y | | inaccessible | Indicate that an object is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | concretes | Specify how the concrete type of the generic SimpleObject should be implemented. *[See also the Book](https://async-graphql.github.io/async-graphql/en/define_simple_object.html#generic-simpleobjects) | ConcreteType | Y | @@ -37,6 +38,7 @@ Similar to `Object`, but defined on a structure that automatically generates get | requires | Annotate the required input fieldset from a base type for a resolver. It is used to develop a query plan where the required fields may not be needed by the client, but the service may need additional information from other services. | string | Y | | shareable | Indicate that a field is allowed to be resolved by multiple subgraphs | bool | Y | | inaccessible | Indicate that a field is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | | override_from | Mark the field as overriding a field currently present on another subgraph. It is used to migrate fields between subgraphs. | string | Y | | guard | Field of guard *[See also the Book](https://async-graphql.github.io/async-graphql/en/field_guard.html)* | string | Y | | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | diff --git a/src/docs/union.md b/src/docs/union.md index 78615184..196fc82c 100644 --- a/src/docs/union.md +++ b/src/docs/union.md @@ -10,6 +10,7 @@ Define a GraphQL union | visible | If `false`, it will not be displayed in introspection. *[See also the Book](https://async-graphql.github.io/async-graphql/en/visibility.html).* | bool | Y | | visible | Call the specified function. If the return value is `false`, it will not be displayed in introspection. | string | Y | | inaccessible | Indicate that an union is not accessible from a supergraph when using Apollo Federation | bool | Y | +| tag | Arbitrary string metadata that will be propagated to the supergraph when using Apollo Federation. This attribute is repeatable | string | Y | # Item attributes