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
input UserInput {
securityId: ID!
docId: someEnum
}
type Mutation {
requestOperation(input: UserInput!): Document // input is a custom type and output is a model
Gen2 shows an error if I use custom type in the arguments
requestOperation a
.mutation()
.arguments({
input: a.ref("UserInput")
})
It was convenient since front-end would get strongly typed, separate interfaces for the input
The text was updated successfully, but these errors were encountered:
Hi @OperationalFallacy this is currently expected behavior. Using a.ref does not dereference model fields when passed to custom query/mutation arguments.you have to explicitly list the fields. Same with referencing an enum, online inline enums are supported.
I will mark this as a feature request for the team to consider.
Environment information
Description
In gen1 I could do this
Gen2 shows an error if I use custom type in the arguments
It was convenient since front-end would get strongly typed, separate interfaces for the input
The text was updated successfully, but these errors were encountered: