feat: support variable arguments in @requires field sets#3448
Style Review Completed
The pull request has 7 style issues.
Duration: 4839ms
PR URL: #3448
Review Log: View detailed log
Review Comments: The AI has posted 7 inline comments with suggestions
Summary of changes:
The pull request updates the documentation to align with several style guide sections. In 'structural-elements', punctuation was removed from list fragments. Under 'voice' and 'verb-tense-and-voice', the tone was updated to be more authoritative and prescriptive using the present tense. 'Word-and-symbol-usage' now includes standard contractions and consistent naming conventions for 'the Router'. Language and framing improvements were made to ensure proper article usage and a professional, reader-focused perspective. Finally, 'text-formatting' and 'products-and-features' updates ensure 'Router' is correctly styled as code when referring to components and treated as a standalone product name.
Annotations
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L150
**Structural Elements**: List items that are fragments should omit ending punctuation.
```suggestion
- Operation variable (`shippingEstimate(units: $clientUnits)`): The variable is forwarded into the subgraph fetch and resolved at execution time
```
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L151
**Structural Elements**: List items that are fragments should omit ending punctuation.
```suggestion
- Literal (`shippingEstimate(units: "POUNDS")`): The literal is forwarded as-is
```
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L152
**Structural Elements**: List items that are fragments should omit ending punctuation.
```suggestion
- Omitted, nullable argument: Resolves to `null`
```
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L153
**Structural Elements**: List items that are fragments should omit ending punctuation.
```suggestion
- Omitted argument with a schema default: Resolves to that default
```
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L199
**Voice**: Use an authoritative, prescriptive tone for the recommended configuration.
```suggestion
Include `resolvable: false` in the `@key` directive to indicate that this subgraph doesn't define a reference resolver for the `Product` entity.
```
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L157
**Word and Symbol Usage**: Use dictionary-valid contractions like 'don't' for better readability.
```suggestion
The variable's name must match an argument of the computed field, and that argument's type must be compatible with the type expected where the variable is used. Otherwise, composition fails with a `REQUIRES_INVALID_FIELDS` error. `@requires` field sets support variables, but `@provides` and `@key` don't.
```
apollo-librarian / AI Style Review
docs/source/schema-design/federated-schemas/entities/contribute-fields.mdx#L134
**Framing**: Use 'The router' or 'Apollo' instead of just 'Router' to maintain a professional tone, and ensure the focus remains on the reader's client.
**Language**: Add an article before 'Router' for better grammar and clarity.
**Products and Features**: Add an article before 'Router' because it is a standalone product name.
**Text Formatting**: Use code font for the `Router` when referring to the component.
**Verb Tense and Voice**: Use the present tense instead of future tense.
**Voice**: Prescribe the specific approach using authoritative language.
**Word and Symbol Usage**: Use 'the Router' or 'Router' consistently, but ensure the sentence structure is natural. More importantly, check for discouraged words; 'supplies' is fine, but ensure 'the' is used before Router if it's the subject.
```suggestion
Instead of a static literal, use a variable that references one of the computed field's own arguments. The router forwards the value your client supplies for that argument to the subgraph that defines the required field:
```