You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating to the latest set of graphql-tools packages and one thing I'm having to do is refactor the directives since I see that SchemaDirectiveVisitor was removed.
It seems the ability to alter/validate inputs/arguments on use has been completely removed and it's impossible outside of creating a custom scalar. There's no alternative in the examples apart from transforming a schema to use custom scalars.
Obviously it was done for a reason... but I'm searching the net and can't find a single reference to the reasoning behind why SchemaDirectiveVisitor was removed and how to achieve the same thing. What problem did this solve?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm migrating to the latest set of graphql-tools packages and one thing I'm having to do is refactor the directives since I see that
SchemaDirectiveVisitor
was removed.I've got a directive like so:
And when I look at the examples here for modifying inputs: https://the-guild.dev/graphql/tools/docs/schema-directives#enforcing-value-restrictions I can't help but notice that it's A LOT more code and complexity. It seems now I have to create a type per usage and cache them etc like:
It seems the ability to alter/validate inputs/arguments on use has been completely removed and it's impossible outside of creating a custom scalar. There's no alternative in the examples apart from transforming a schema to use custom scalars.
Obviously it was done for a reason... but I'm searching the net and can't find a single reference to the reasoning behind why SchemaDirectiveVisitor was removed and how to achieve the same thing. What problem did this solve?
Beta Was this translation helpful? Give feedback.
All reactions