Skip to main content
Mutations for the Semble API

Information on mutating with the Semble API

Jessica Magri avatar
Written by Jessica Magri
Updated over a week ago

This article is for software developers and IT admins who want to integrate the Semble Public API into their own systems. Our updated API mutation list can be found here.

Before you attempt to perform a mutation, make sure you have signed into the Semble API.

From this article, you can go directly to our updated list of mutations, or see below for information about mutations:


About Mutations

In GraphQL (GQL), a mutation is a server request that can create, update, and delete data.

Every mutation has a root field, and then anything that follows is called the payload. You can request more data to be mutated by adding fields to the payload. You can then further specify the data you want to mutate, by adding arguments within any field or nested object.

Here is an example mutation that would create a patient for a clinic's database:

The response to this mutation would then return the following data:

You can perform more complex mutations with as many fields and arguments as you need. It is also possible to mutate nested information, that can be fully customised with arguments and fields.

To learn more about mutations, you can visit the official GQL website here.


Tips for Mutating

When attempting to perform a mutation you must always:

  • Define the arguments: As mentioned above, arguments are what allow you to specify the precise data that you want to change

  • Define the data output: The output is the data you want to receive from the mutation

Some things to remember when coding a mutation:

  • All mutations must start with mutation{

  • Always open and close your mutation, and its payload with {curly brackets}

  • For arguments, use (round brackets)

Did this answer your question?