UserTC.addResolver({
name: "signUp",
type: UserTC.mongooseResolvers.createOne().getType(),
args: UserTC.mongooseResolvers.createOne().args,
resolve: async ({ source, args, context, info }) => {
// Here it says that source, args etc are of type 'any'. I was expecting the types to be inferred.
// if not, which types should be used? and is there a best practice or a
},
});
Since a hell lot of types are defined, my understanding was, that the types for resolve should be infered. I could not find any documentation on this.
In another issue i read that the "addResolver" is more or less deprecated in the sense that one should use the new factory functions because they have quite a few benifits over the "old way".
For that i wasnt able to find any documentation also. How would i go and add a custom resolver with the factory?
hey there,
i am having trouble defining a new
addResolver
with the right types. This is the user:This is how i would add a new resolver:
Since a hell lot of types are defined, my understanding was, that the types for
resolve
should be infered. I could not find any documentation on this.In another issue i read that the "addResolver" is more or less deprecated in the sense that one should use the new factory functions because they have quite a few benifits over the "old way". For that i wasnt able to find any documentation also. How would i go and add a custom resolver with the factory?
Thank you!