Skip to content

Mutation without user-defined Input #80

@rogerballard

Description

@rogerballard

Is your feature request related to a problem? Please describe.
The Relay spec requires an input object to be registered in the schema, even when a user-defined input is not required for the mutation.

Describe the solution you'd like
When a mutation is defined without a user-defined input type, there should still be an input type generated in the schema.

@Resolver(Ship)
export class ShipResolver {
  @RelayMutation(() => Ship)
  buildShip() {
    return null
  }
}

Should result in the following schema:

input BuildShipInput {
  clientMutationId: String
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions