Skip to content

Add possibility to add custom examples for mutations and query arguments #1048

@JonasEtzold

Description

@JonasEtzold

Currently, I can only add custom examples to individual arguments of a query or mutation via the metadata JSON file or the spectaQL directive. In my case, I have a mutation where the presence of a certain argument depends on the value of another argument. Hence, the autogenerated examples do not make sense, and the easiest way to fix that is to provide custom examples on the mutation level within the metadata JSON file like this:

{
  "OBJECT": {
    "Mutation": {
      "fields": {
        "checkOut": {
          "documentation": {
            "examples": [...]
          }
        }
      }
    }
  }
} 

Right now, this gets ignored since it is not on args level. Is there any other way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions