docs: add doc for tag attribute

This commit is contained in:
Nicolas Moutschen 2022-08-22 11:52:05 +02:00
parent 15afe01f7a
commit 4937dcf93d
11 changed files with 23 additions and 2 deletions

View File

@ -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

View File

@ -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 |

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -12,6 +12,7 @@ It also implements `From<InnerType>` and `Into<InnerType>`.
| 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

View File

@ -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 |

View File

@ -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 |
| 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 |

View File

@ -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 |

View File

@ -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