Mutation

The mutation type defines how GraphQL operations change data. It is analogous to performing HTTP verbs such as POST, PATCH, and DELETE. The various mutation types supported in the GraphQL API are all sent using POST. The other HTTP verbs are not used.

All 4me mutations accept a single input argument, an input type, which contains the values that are used by the mutation. Using a single input argument makes it easy to post whole JSON objects to the mutation using one GraphQL variable instead of making a separate variable for each argument.

A sample usage of a mutation to create a Request:

    mutation {
      requestCreate(input: { subject: "My request", category: "other" }) {
        errors {
          path
          message
        }
        request {
          id
          requestId
          subject
          category
        }
      }
    }

Note that for this example to work your OAuth token must have added a scope to allow action Request - Create.

Mutations

4me exposes the following mutations to allow data to be changed.