In the Writing Your First Query guide you were able to fire up a couple of queries and get Plans whose name contained the keyword “Demo”. Feel free to revisit them to familiarize yourself.
Mutations
You can modify data in GraphQL by writing mutations; creation of a record, for example, is a mutation. As is deletion of a resource, or a change of data on the specific resource. Let's take a look at an example mutation to show you the basics.
Modifying Plans
In this example, our goal is to look up plans and change their name. As a reminder, here is a lookup of the plans with names containing "Demo":
Let's use the Sales Team Demo Plan and update its name to Sales Demo Plan. For that, let’s check the documents and find the corresponding planUpdate mutation:
Based on the documents, we will need to call the planUpdate mutation, pass PlanUpdateInput, and request success, errors in return. We can try that first in the playground:
As you can see, that worked as planned. But this is just one simple example of a mutation; so much more is possible with BenchPrep GraphQL API.
Remember to check the documentation and schema frequently, and contact our Support team if necessary.