Apologies for the simple question, just starting o...
# prisma-whats-new
v
Apologies for the simple question, just starting out... I'm having trouble understanding how I can update something in the graph.cool data - I have
type Item { id ID! @isUnique connected: Boolean }
and I'd like to toggle
connected
- What would the query be to do so?
d
To change data on the server, you use GraphQL mutations. In this case, you will want to use the updateItem mutation
v
I think the part that is confusing me is the
updateItem
bit -- does graph.cool (or graphql) automatically 'add' add<name> update<name> delete<name> or is that something I'm supposed to be setting up somewhere?
d
Yes, Graph.cool generates a whole load of mutations for your API. For every type X you will have createX, updateX and deleteX