amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

Mutation arguments does not accept customType

Open OperationalFallacy opened this issue 1 year ago • 2 comments

Environment information

latest packages

Description

In gen1 I could do this

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

OperationalFallacy avatar Jul 12 '24 14:07 OperationalFallacy