-
Notifications
You must be signed in to change notification settings - Fork 842
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: initial suport for applied directives #652
Open
dariuszkuc
wants to merge
2
commits into
graphql-go:master
Choose a base branch
from
dariuszkuc:applied_directives
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update type definitions to expose `AppliedDirective`s. **This initial implementation only exposes applied directive as metadata and does not modify runtime wiring to process them**. Exposing directives is a pre-req to enable support for [Apollo Federation](https://www.apollographql.com/docs/federation/) (related: graphql-go#492). Following the pattern from [`graphql-java`](https://github.com/graphql-java/graphql-java) and [`HotChocolate`](https://github.com/ChilliCream/hotchocolate) where they make distinction between directive type definition (i.e. `directive @foo on FIELD_DEFINITION`, maps to existing `Directive struct` for backwards compatibility) and where directives are actually applied within the schema (i.e. `type Foo @bar { baz @Qux }`, maps to new `AppliedDirective` struct`).
dariuszkuc
force-pushed
the
applied_directives
branch
from
October 19, 2022 16:43
d6a745e
to
62a54ad
Compare
dariuszkuc
force-pushed
the
applied_directives
branch
from
October 19, 2022 16:44
62a54ad
to
0cd84ad
Compare
@chris-ramon can you help with merging this PR? |
dariuszkuc
added a commit
to dariuszkuc/apollo-federation-subgraph-compatibility
that referenced
this pull request
Oct 31, 2022
Example `graphql-go` integration that is using https://github.com/dariuszkuc/graphql/releases/tag/v0.9.0-federation NOTE: this is a temporary solution while we are waiting for `graphql-go` PRs to get merged ([651](graphql-go/graphql#651), [652](graphql-go/graphql#652) and [653](graphql-go/graphql#653)). Resolves: apollographql#74
dariuszkuc
added a commit
to apollographql/apollo-federation-subgraph-compatibility
that referenced
this pull request
Nov 1, 2022
Example `graphql-go` integration that is using https://github.com/dariuszkuc/graphql/releases/tag/v0.9.0-federation NOTE: this is a temporary solution while we are waiting for `graphql-go` PRs to get merged ([651](graphql-go/graphql#651), [652](graphql-go/graphql#652) and [653](graphql-go/graphql#653)). Resolves: #74
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update type definitions to expose
AppliedDirective
s. This initial implementation only exposes applied directive as metadata and does not modify runtime wiring to process them. Exposing directives is a pre-req to enable support for Apollo Federation (related: #492).Following the pattern from
graphql-java
andHotChocolate
where they make distinction between directive type definition (i.e.directive @foo on FIELD_DEFINITION
, maps to existingDirective struct
for backwards compatibility) and where directives are actually applied within the schema (i.e.type Foo @bar { baz @qux }
, maps to newAppliedDirective
struct`).