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

feat(federation): Initial support for @tag and @inaccessible in composition #756

Merged
merged 14 commits into from
May 18, 2021

Conversation

trevor-scheer
Copy link
Member

@trevor-scheer trevor-scheer commented May 13, 2021

Introduce the existence and composition of the @tag and @inaccessible directives,
to be printed in supergraphSdl and used for schema filtering.

TODO:

  • Figure out value types / provides regression (thanks @martijnwalraven!)
  • Address a few TODOs in the code
  • Open issues about validations and more test cases

The changes we made to include applied directives on the field metadata broke a hacky workaround we used to include `@join_field(graph:)` on fields of the owning service, and our fix of that broke `@provides` on fields of value types. This commit cleans up the code a bit so we replicate the previous behavior in a more straightforward way.
federation-js/src/composition/compose.ts Outdated Show resolved Hide resolved
federation-js/src/composition/compose.ts Outdated Show resolved Hide resolved
federation-js/src/service/printSupergraphSdl.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@martijnwalraven martijnwalraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready to be merged. Before the next release, I do think we may want to avoid outputting directive definitions for @inaccessible and @tag to avoid changes to every composed schema even if these aren't used. And we still need to define core features for @inaccessible and @tag. But I can do that as part of the core schema work that I've started on top of this. That doesn't have to block this PR I think.

@trevor-scheer trevor-scheer changed the base branch from main to release-federation-0.26.0 May 18, 2021 20:39
@trevor-scheer trevor-scheer merged commit f1d346e into release-federation-0.26.0 May 18, 2021
@trevor-scheer trevor-scheer deleted the trevor/inaccessible-tag branch May 18, 2021 20:55
trevor-scheer added a commit that referenced this pull request Jun 24, 2021
…omposition (#756)

Introduce the existence and composition of the @tag and @inaccessible
directives,to be printed in `supergraphSdl` and used for schema filtering.
trevor-scheer added a commit that referenced this pull request Jul 6, 2021
…omposition (#756)

Introduce the existence and composition of the @tag and @inaccessible
directives,to be printed in `supergraphSdl` and used for schema filtering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants