Renamed scalar still present in the schema if used as directive argument · Issue #2933 · graphql-java/graphql-java · GitHub
Skip to content

Renamed scalar still present in the schema if used as directive argument #2933

Closed

Description

@dariuszkuc

Describe the bug
When custom scalar is used as a directive argument, old scalar name is still present in the schema after rename.

In the example below both Query.field return type and myDirective argument are updated to the Bar type but the schema contains entries for both original Foo and renamed Bar.

To Reproduce
Modify current scalar rename test to include directive (#2928)

scalar Foo
directive @myDirective(foo: Foo) on FIELD_DEFINITION
type Query {
  field: Foo @myDirective
}

See: dariuszkuc@6005e8e

It looks like the original Foo is only added if the directive is applied, i.e. if we update field: Foo @myDirective to field: Foo we won't have the old type in the schema. Might be an issue with applied directives.

Activity

  1. added a commit that references this issue on Aug 24, 2022
  2. bbakerman commented on Aug 24, 2022

    @bbakerman
    Member

    Thanks for reporting. I have created a reproduction test and can confirm it does not remove the old type if it used in applied schemas

  3. added a commit that references this issue on Aug 24, 2022
  4. bbakerman commented on Aug 24, 2022

    @bbakerman
    Member

    I can confirm that the old directive mechanism works (the type gets replaced) however the applied directive does not

  5. andimarek commented on Aug 24, 2022

    @andimarek
    Member

    We found the bug and fixed it ... see #2934

  6. added this to the 20.0 milestone on Aug 24, 2022
  7. added a commit that references this issue on Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions