-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
keep-openTells Stale Bot to keep PRs and issues openTells Stale Bot to keep PRs and issues open
Description
Describe the bug
Using
SchemaPrinter.ExcludeGraphQLSpecifiedDirectivesPredicate
works differently regarding OneOf and Deprecated directives. With ExcludeGraphQLSpecifiedDirectivesPredicate, both directive definitions are removed from generated file, but with OneOf, also directive's usage is removed from types.
So for example
input SomeType @oneOf {
field1: String
field2: Int
}
becomes
input SomeType {
field1: String
field2: Int
}
This doesn't happen with Deprecated, they are still present in the schema.
Also I didn't test with other directives.
To Reproduce
OneOf Directive is added with:
newInputObject()
.withDirective(Directives.OneOfDirective)
...
and deprecated with:
newFieldDefinition()
.deprecate("This field is deprecated")
...
SchemaPrinter is used as:
new SchemaPrinter(SchemaPrinter.Options.defaultOptions()
.includeDirectives(SchemaPrinter.ExcludeGraphQLSpecifiedDirectivesPredicate))
Metadata
Metadata
Assignees
Labels
keep-openTells Stale Bot to keep PRs and issues openTells Stale Bot to keep PRs and issues open