GraphQL Queries and Mutations
query ListEntitiesQuery {
listEntities {
success
errors
entity {
value
name
id
}
}
}
query GetEntityQuery($getEntityId: ID!) {
getEntity(id: $getEntityId) {
success
errors
entity {
value
name
id
}
}
}
mutation CreateEntityMutation($createEntityEntity: EntityInput) {
createEntity(entity: $createEntityEntity) {
success
errors
entity {
id
name
value
}
}
}
mutation UpdateEntityMutation($updateEntityId: ID!, $updateEntityName: String, $updateEntityValue: Float) {
updateEntity(id: $updateEntityId, name: $updateEntityName, value: $updateEntityValue) {
success
errors
entity {
id
name
value
}
}
}
mutation DeleteEntityMutation($deleteEntityId: ID) {
deleteEntity(id: $deleteEntityId) {
success
errors
entity {
id
name
value
}
}
}
GraphQL Variables
{
"getEntityId": 1,
"createEntityEntity": {
"name": "hello",
"value": 20.0
},
"updateEntityId": 1,
"updateEntityName": "updated",
"updateEntityValue": 50.0,
"deleteEntityId": 1
}