Select Page

A couple of weeks ago I started to discuss the idea of GraphQL for Camunda BPM. It all materialized quite fast in a public GitHub repo here: camunda-graphql.

What is so fascinating about GraphQL?
Well, check out GraphQL for Avaloq where I describe the basics of GraphQL, example queries, the advantages of GraphQL over REST and other things.

Work is in progress for Camunda GraphQL and so far it looks very promising. I also get excellent support from Camunda. Thanks guys.

To exemplify the concepts of Camunda GraphQL I started coding:

  • query resolvers for tasks and processes
  • using arguments
  • resolving complex types, started with ProcessDefintion
  • mutations, started with setAssignee for a task

Because I wanted a deeper integration than in edoras one GraphQL API I choose to use the Camunda Java API directly. This makes it fast and we can access all Camunda functionality via GraphQL. How cool is that?

So the whole project turned out to be a Java Springboot application – no full-stack-Javascript this time, sorry.

Luckily we found the relative new graphql-java-tools repo which gave us the possibility to write the Camunda BPM Schema (the *.graphqls files ) in GraphQL schema language plain text instead of coding Schema definitions in Java as described in graphql-java Schema definitions. This makes it more readable and comprehensible.

What makes the approach also light-weight is the fact, that we can use the Camunda Java API classes to fill in the GraphQL implementation. That means:

A Camunda GraphQL schema type, defined in a *.graphqls file, maps to a Camunda Java API class. The mapping is done by the name of the class/type.

That means (for almost all cases) we do not have to write our own arbitrary Java classes that represent GraphQL types. The Camunda API classes do that for us.

I try to post updates here from time to time.

Also, you can watch our GitHub repo 🙂