Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[federation] add support for Fed 2.1 #1591

Merged
merged 4 commits into from
Nov 10, 2022
Merged

Conversation

dariuszkuc
Copy link
Collaborator

📝 Description

By default, Supergraph schema excludes all custom directives. Federation 2.1 adds new @composeDirective that can be used to instruct composition logic to preserve custom directives in the Supergraph schema.

directive @composeDirective(name: String!) repeatable on SCHEMA

🔗 Related Issues

N/A

@dariuszkuc dariuszkuc added type: enhancement New feature or request changes: minor Changes require a minor version module: generator Issue affects the schema generator and federation code labels Nov 4, 2022
@dariuszkuc
Copy link
Collaborator Author

IMHO in a code first library it doesn't make sense to support multiple versions of Federation v2 (i.e. 2.0, 2.1, 2.2 etc) and we should always default to the latest supported version.

If needed we can introduce this functionality behind some opt-into-version mechanism but it will greatly increase complexity and support burden of maintaining multiple versions.

@dariuszkuc dariuszkuc changed the title Fed2.1 [federation] add support for Fed 2.1 Nov 4, 2022
@dariuszkuc dariuszkuc marked this pull request as ready for review November 8, 2022 00:13
@dariuszkuc dariuszkuc enabled auto-merge (squash) November 8, 2022 00:13
@dariuszkuc dariuszkuc disabled auto-merge November 8, 2022 00:16
@dariuszkuc dariuszkuc added the status: do not merge Do not merge until this is removed label Nov 8, 2022
@dariuszkuc
Copy link
Collaborator Author

Should be merged after #1595

By default, Supergraph schema excludes all custom directives. Federation 2.1 adds new `@composeDirective` that can be used to instruct composition logic to preserve custom directives in the Supergraph schema.

```graphql
directive @composeDirective(name: String!) repeatable on SCHEMA
```
@dariuszkuc dariuszkuc removed the status: do not merge Do not merge until this is removed label Nov 8, 2022
@dariuszkuc dariuszkuc enabled auto-merge (squash) November 8, 2022 21:31
@dariuszkuc dariuszkuc disabled auto-merge November 8, 2022 23:27
@dariuszkuc dariuszkuc enabled auto-merge (squash) November 8, 2022 23:27
@dariuszkuc dariuszkuc merged commit 7b40e7d into ExpediaGroup:master Nov 10, 2022
@dariuszkuc dariuszkuc deleted the fed2.1 branch November 10, 2022 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: minor Changes require a minor version module: generator Issue affects the schema generator and federation code type: enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants