graphcraft icon indicating copy to clipboard operation
graphcraft copied to clipboard

Expose graphql-sequelize hooks to modify findOptions

Open jjcollinge opened this issue 3 years ago • 1 comments

Currently I'm trying to use a graphcraft model hook to apply an additional operation to the WHERE clause of a fetch. However, because the additional operation needs to be expressed as a Sequelize Literal query it gets mangled in the argsToFindOptions function of graphql-sequelize which stops it working. Would you be open to me adding a way to provide hooks that are directly added as graphql-sequelize hooks rather than invoked beforehand so that I can modify the findOptions directly.

jjcollinge avatar Dec 01 '21 11:12 jjcollinge

Of course, please go ahead and raise a PR, will review it as soon as it's in.

alirizwan avatar Dec 01 '21 12:12 alirizwan