printSchemaWithDirectives doesn't print all directives
danielrearden opened this issue · comments
printSchemaWithDirectives
only prints a subset of schema directives. The specific issue I ran into was with directives on enum values, but looking at the code it looks like the only targets that are included are objects, input objects, fields and input object fields. It looks like the remaining possible targets (schema definition, scalars, arguments, unions, interfaces, enums and enum values) are left untouched.
Could you share a reproduction?
Sorry, I can submit a failing test case or even a PR when I have a bit more time. Here's a reproduction you can run though:
https://runkit.com/danielrearden/5ec1b5f7cb578c001ea95c4c
So it looks like the only missing targets are SCHEMA, ARGUMENT_DEFINITION and ENUM_VALUE. However, it also appears interfaces are dropped altogether.
Fixed in @graphql-tools/utils
. See here for migration
https://www.graphql-tools.com/docs/migration-from-toolkit