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
I looked at the docs for nexus and the source code here, but no luck. I also I tried to do something like this, but no dice:
@nxs.objectType({description: 'Namespace for information related to the app',})exportclassApp{constructor(privatectx: ExecContext){}
@nxs.queryField(()=>{return{type: App}})staticapp(_,ctx){returnnewApp(ctx)}
@nxs.mutationField(()=>{return{name: 'initProject',type: class{constructor(someValue: string){}}}})publicasyncinitProject(){return{msg: 'ok!'}}}
The text was updated successfully, but these errors were encountered:
I believe it should work if you make the method static:
@nxs.objectType({description: 'Namespace for information related to the app',})exportclassApp{constructor(privatectx: ExecContext){}
@nxs.queryField(()=>{return{type: App}})staticapp(_,ctx){returnnewApp(ctx)}
@nxs.mutationField(()=>{return{type: 'Boolean'}})staticasyncinitProject(){returntrue}}
I looked at the docs for nexus and the source code here, but no luck. I also I tried to do something like this, but no dice:
The text was updated successfully, but these errors were encountered: