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
You may get existing Resolver and wrap its resolve method.
UserTC.wrapResolverResolve('createOne',(next)=>async(rp)=>{constdoc=awaitnext(rp);// any logic after saving document in DBreturndoc;});
if you create schema in any another way
Just get fieldConfig and wrap its resolve method manually
constfc=schemaComposer.Mutation.getField('create');constprevResolve=fc.resolve;fc.resolve=async(source,args,context,info)=>{constrecord=awaitprevResolve(source,args,context,info);// any logic after savingreturnrecord;};
For example, if i need to send an email after a user has signed up how can i do i see a pre-save hook but didn't find any for the post.
The text was updated successfully, but these errors were encountered: