Skip to content

Commit

Permalink
Updated documentation for morpher
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorDiaconu committed Mar 16, 2020
1 parent 84a98d4 commit 24a90d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/morpher.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ expose({
collection: () => collection,
// In the mutation methods you can perform propper checks, you get access to the context
// You have ability to extract user from ctx `ctx.userId` or `ctx.user`
update: (ctx, {selector, modifier, modifiedFields, modifiedTopLevelFields}) => true,
insert: (ctx, {document}) => true,
remove: (ctx, {selector}) => true,
find(ctx, params) {
// GRAPHQL_RESOLVER_ARGS = [ parent, args, ctx, ast ]
update: (ctx, {selector, modifier, modifiedFields, modifiedTopLevelFields}, ...GRAPHQL_RESOLVER_ARGS) => true,
insert: (ctx, {document}, ...GRAPHQL_RESOLVER_ARGS) => true,
remove: (ctx, {selector}, ...GRAPHQL_RESOLVER_ARGS) => true,
find(ctx, params, ...GRAPHQL_RESOLVER_ARGS) {
// params is an object
// by default filters, options are always empty objects, if they were not passed
// if you pass other params filters and options will still be empty objects
Expand Down

0 comments on commit 24a90d0

Please sign in to comment.