apollographql / federation-jvm

JVM support for Apollo Federation

Home Page:https://www.apollographql.com/docs/federation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] SchemaTransformer does not look for applied directives

dariuszkuc opened this issue · comments

GraphQL Java v18 fixed an old issue of using directive definition to also represent the value being applied to a target schema element. Starting with v18 graphql-java now makes a distinction between those two

  • graphql.schema.GraphQLDirective - (existing class) should only be used for directive definition in the schema
  • graphql.schema.GraphQLAppliedDirective - (new class) should be used for specifying directive value that is being applied to a target schema element

SchemaTransformer currently uses old deprecated method to find entity objects that define @key directive. If users update their code to correctly apply the directives, schema transformer will no longer work correctly.

Code should be updated to also look at the directives that were applied to a target schema element.