graphql-compose-mongoose icon indicating copy to clipboard operation
graphql-compose-mongoose copied to clipboard

how to make add/update/delete audit for all resolvers ?

Open atteia opened this issue 7 years ago • 1 comments

Hello

I wrote a collection for audit but I want a simple way to insert all logs in it

any help please ?

atteia avatar Jul 04 '18 18:07 atteia

You may wrapResolvers (https://graphql-compose.github.io/docs/en/basics-resolvers.html) with your additional logic.

After success wrapping one resolver, you may write a helper function which will do it for all your needed types/resolvers.

nodkz avatar Jul 04 '18 18:07 nodkz