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.