nestjs-relay icon indicating copy to clipboard operation
nestjs-relay copied to clipboard

Support multiple arguments in a mutation

Open rogerballard opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. No.

Describe the solution you'd like When creating a relay-compliant mutation, I would like the option of adding individual arguments, rather than having to define a separate input type.

Example

@Resolver(Ship)
export class ShipResolver {
  @RelayMutation(() => Ship)
  buildShip(
    @InputArgs() name: string,
  ) {
    return null
  }
}

Should result in the following schema definition:

input BuildShipInput {
  name: String!
  clientMutationId: String
}

type Mutation {
  buildShip(input: BuildShipInput!): BuildShipPayload
}

rogerballard avatar Jun 18 '20 12:06 rogerballard