Open kita3222 opened 1 month ago
Hey👋, thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂
The same is true for refs:
createTodo: a
.mutation()
.arguments({
name: a.string().required(),
title: a.string().required(),
type: a.ref("TodoType"), // Type 'RefType<RefTypeArgFactory<"TodoType">, never, undefined>' is not assignable to type 'BaseModelField | EnumType<readonly string[]>'.
})
.returns(a.ref("TodoResponse"))
.authorization((allow) => [allow.authenticated()])
.handler(a.handler.function(defineFunction("createTodo"))),
Hey @kita3222, Thanks for raising this. We can reproduce the issue. Hence, marking this as a bug for the team to evaluate further.
Environment information
Description
When I try to set ENUM in the arguments of the Function Mutation, I get the following error and cannot do a sandbox deploy.
This is the definition of my function: