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

Turning GQLExtend to extend type keywords instead of extends directive #1530

Open
coderfromhere opened this issue Dec 6, 2022 · 2 comments
Labels
federation Issue related to federation support

Comments

@coderfromhere
Copy link

Hi!

I wonder if there's a way to instruct schema renderer responsible for api.render attribute to use extend keywords on defined types instead of the @extends directive in the resulting SDL? Apollo docs seem to discourage use of the directive in favour of the keyword.

I.e. turning this:

type Query @extends { ... }

into this

extend type Query { ... }
@coderfromhere coderfromhere changed the title Turning @GQLExtend to extend type instead of @extend Turning @GQLExtend to extend type instead of @extends Dec 6, 2022
@coderfromhere coderfromhere changed the title Turning @GQLExtend to extend type instead of @extends Turning GQLExtend to extend type keywords instead of extends directive Dec 6, 2022
@ghostdogpr ghostdogpr added the federation Issue related to federation support label Dec 6, 2022
@dariuszkuc
Copy link

FYI @extends directive/extend type syntax is no longer needed for Federation v2 and should generally be omitted from the schema. Extending types is still a useful functionality and there are valid use cases for it (but federation v2 does not require it all).

@paulpdaniels
Copy link
Collaborator

I Think we could handle this by moving GQLExtend into core and detecting it the way we do GQLDeprecated during derivation. Then we can just deprecate the one in the federation package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
federation Issue related to federation support
Projects
None yet
Development

No branches or pull requests

4 participants