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
{{ message }}
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
You are running into an issue we have been running into as well. This is because of how the crud service is typing the create method. Here's the solve I've been doing.
import{CreateUserInput,User}from"your-generated-types.ts";// TypeScript will protect you here. careful not to use `as CreateUserInput`constcreatePayload: CreateUserInput={fullname: 'John Doe',email: 'email@domain.com',password: '12345',phone: '555-1234',};// you're casting "User" and basically telling TypeScript it's OK.// this typically would be unsafe, but because you're typing it above, this should be acceptable :)constuser=awaitcontext.graphback.User.create(<User>createPayload);
Hello! I'm trying to write a custom resolver for a reason. But when I try to use create method, I get this type error.
But when I ignore the error with // @ts-ignore I get no error and it works.
How can I make this without ignore the errors?
Thanks!
The text was updated successfully, but these errors were encountered: