Is there some way to make a resolver return the sa...
# prisma-whats-new
j
Is there some way to make a resolver return the same structure as a query from client? Let’s say I call query User($id: ID!) from client, but instead call query MyUser(...) from client where MyUser is a resolver that updates something on server, but should return the same object as if I called User(). Is this possible?
d
prisma or graphcool ? structure of a return value depends on what do you have in your schema, if you have User type as a return type, then it's up to you to obtain that user somewhere and return it
j
running graphcool still
trying to return the object I get, but when defining the payload I get error saying that relations are not supported yet, and I don’t know if I can define the return payload in another way.
t
You can define it in payload as a Json, e.g.: someField: Json
d
yeah, Json is only way ... or switch to prisma 😉
j
ok, thank you 🙂