GraphQL for Camunda - a data query language - progress:
So far I have implemented these types:
Here is how it looks in the GraphiQL app with
left side: an example query
right side: JSON result from the GraphQL server
This query gives you all tasks. For each task it fetches the id, name and processDefinition. For each processDefinition, if available, the id and the name is fetched
Which fields exist on a task (=type TaskEntity)?
See the “automatic documentation” on the right side:
The idea is, that GraphiQL will be part of the Camunda extension making it super easy to fetch and mutate data using GraphQL on Camunda. Currently I am running it standalone next to the server, so I had an extra installation here.
Under the hood we use the Camunda Java API as documented and a GraphQL Schema / Type System to define what query and mutations are possible. This Schema we are going to extend now step by step along with the development of the resolvers.
Current Lines Of Code so far: 209 (in 4 Java Classes + 2 GraphQL Schema files)
- Figure out which GraphQL types (based on Camunda Java API classes) should be implemented next.
Possibles candidate are:
ExecutionEntity (aka ProcessInstances)
- User, Groups
- Switch to public GitHub repo
- Implement mutations (again, based on what its possible with the Camunda Java API, “clean and green”)