feat: initial suport for applied directives#652
Open
dariuszkuc wants to merge 2 commits intographql-go:masterfrom
Open
feat: initial suport for applied directives#652dariuszkuc wants to merge 2 commits intographql-go:masterfrom
dariuszkuc wants to merge 2 commits intographql-go:masterfrom
Conversation
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`).
d6a745e to
62a54ad
Compare
62a54ad to
0cd84ad
Compare
Contributor
Author
|
@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
This file contains hidden or 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
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
AppliedDirectives. 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-javaandHotChocolatewhere they make distinction between directive type definition (i.e.directive @foo on FIELD_DEFINITION, maps to existingDirective structfor backwards compatibility) and where directives are actually applied within the schema (i.e.type Foo @bar { baz @qux }, maps to newAppliedDirectivestruct`).