Defining a custom GraphQL Schema directive to prevent empty arrays
I have a node project using GraphQL(v16.7.0) and the @graphql-tools/utils
library, attempting to setup a nonEmptyArray
custom schema directive to throw an error whenever a mutation is called with an empty array for an input. It would be used like this: