Git Product home page Git Product logo

camunda-platform-7-graphql's Introduction

Community Extension Badge Camunda Platform 7 Lifecycle: Incubating

Camunda Platform GraphQL

Camunda Platform GraphQL is a Community Extension for Camunda Platform 7 that allows you to use GraphQL to query and mutate Process Engine data in a simple way.

Overview

Release 0.4.0

  • updated the resolvers to support the GraphQL Kickstart
  • GraphiQL endpoint default set to /graphiql
  • GraphQL endpoint default set to /graphql
  • Added historic queries
  • Added relationship between historic types
  • refactored the test setup and move test from webapp to extension
  • changed the app to execute on Spring Boot
  • Updated example
  • updated documentation

Spring Boot Camunda GraphQL Server Embbedded

Spring Boot (only supported on version 0.4.0 or higher)

In your Camunda Spring Boot project add the following dependencies

Gradle

Camunda Extension GraphQL

    implementation group: 'org.camunda.platform7.extension.graphql', name: 'camunda-platform-7-graphql', version: '0.5.0'

Spring Boot GraphQL Kickstart (the version 11.1.0 or higher)

    implementation group: 'com.graphql-java-kickstart', name: 'graphql-spring-boot-starter', version: '11.1.0'
    implementation group: 'com.graphql-java-kickstart', name: 'graphiql-spring-boot-starter', version: '11.1.0'
    implementation group: 'com.graphql-java-kickstart', name: 'graphql-java-tools', version: '11.0.1'

Maven

Camunda Extension GraphQL

    <dependency>
        <groupId>org.camunda.platform7.extension.graphql</groupId>
        <artifactId>camunda-platform-7-graphql</artifactId>
        <version>0.5.0</version>
    </dependency>

Spring Boot GraphQL Kickstart (the version 11.1.0 or higher)

    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter</artifactId>
        <version>11.1.0</version>
    </dependency>

    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphiql-spring-boot-starter</artifactId>
        <version>11.1.0</version>
    </dependency>

    <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-java-tools</artifactId>
        <version>11.0.1</version>
    </dependency>

Use the example if necessary.

By default the GraphQL and GraphiQL are available at the uri /graphql and /graphiql respectively, this configuration and others can be change by properties. The available settings can be consulted directly in the project of Spring Boot GraphQL Kick Start

Install the Camunda GraphQL Server on Tomcat or Wildfly

Build the GraphQL server

  1. Checkout or Clone this repository using Git
  2. Adapt extension/src/main/resources/application.properties:
  3. Build the project
    for Apache Tomcat: mvn clean package
    for JBoss WildFly use the profile wildfly: mvn clean package -Pwildfly

Tomcat installation

  • Get the latest Release (.war file) from the Camunda Repo
  • deploy it to your Tomcat server e.g. copy it to the Tomcat /webapps` folder

Wildfly installation

For WildFly you have to clone the project and build the .war file.
See chapter Build the GraphQL server.

Test the Installation

Access the GraphQL endpoint with a browser

Access the GraphQL endpoint with GraphiQL an in-browser IDE for exploring GraphQL

Other GraphQL clients

Beside the build-in GraphiQL you can use other GraphQL clients.
Basically...

  • ...point your GraphQL client to the GraphQL server endpoint:
    http://<server-name>:<PORT>/camunda-graphql/graphql
  • depending on the GraphQL server authentication settings you need to add Authentication Header to your requests

Examples of other GraphQL clients:


GraphQL Queries and Mutations

Query Tasks:

query tasks

Query Tasks using a Filter:

query tasks with filter

Query Process Instances:

query proceses

Query Process Instance Variables:

query proceses with vars

Query Task Variables:

query tasks with vars

Mutation
Assign a user to a task

setAssignee mutation

Mutation
Start a Process Instance with start variables
startProcessInstance

GraphQL Schemas and Types

A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.

Docs Schema

Docs Root Types

Currently defined queries:

Docs Queries

Currently defined mutations:

Docs Mutations

Defining / Extending the Camunda GraphQL Schema

We decided to use the Schema Definition Language (a GraphQL DSL) to define the Camunda GraphQL schema instead of coding it in Java.
The Schema Definition Language is very easy to understand.
For example this is the Type Definition of the Camunda Task:


graphqls TaskEntity

To get an understanding of Schemas please visit:

The Camunda GraphQL Schema is comprised of several schema files located at src/main/resource/*.graphqls.
This is an attempt to group GraphQL Type Definitions by topics

schema files overview

The so called Root Types serve as entry points for Queries and Mutations (in the future: Subscriptions etc.)

The Root Types schema file is src/main/resources/camunda.graphqls

Introspection

For interactive GraphQL code completion, build-time validation, GraphQL Schema stiching or other fancy things
any GraphQL client can use GraphQLs Introspection to retrieve the whole or parts of the Servers GraphQL Schema.

This is a possible and probably quite complete Introspection Query (from GraphQL Voyager):

query IntrospectionQuery {
    __schema {
      queryType { name }
      mutationType { name }
      subscriptionType { name }
      types {
        ...FullType
      }
      directives {
        name
        description
        locations
        args {
          ...InputValue
        }
      }
    }
  }

  fragment FullType on __Type {
    kind
    name
    description
    fields(includeDeprecated: true) {
      name
      description
      args {
        ...InputValue
      }
      type {
        ...TypeRef
      }
      isDeprecated
      deprecationReason
    }
    inputFields {
      ...InputValue
    }
    interfaces {
      ...TypeRef
    }
    enumValues(includeDeprecated: true) {
      name
      description
      isDeprecated
      deprecationReason
    }
    possibleTypes {
      ...TypeRef
    }
  }

  fragment InputValue on __InputValue {
    name
    description
    type { ...TypeRef }
    defaultValue
  }

  fragment TypeRef on __Type {
    kind
    name
    ofType {
      kind
      name
      ofType {
        kind
        name
        ofType {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
                ofType {
                  kind
                  name
                }
              }
            }
          }
        }
      }
    }
  }



The response of the above Introspection Query can be pasted into tools like GraphQL Voyager as a Custom Schema and within seconds you get a graphical representation of your Schema, like so:

graphical GraphQL Schema

Awesome!

Authentication

The Camunda GraphQL server supports three Authentication methods:

Properties which manage authentication are:

  • auth.Filter
  • JWT.secret
  • JWT.issuer

These properties can be set as

  • JNDI attributes from java:comp/env
  • Java System properties
  • OS environment variables
  • properties in application.properties

E.g. if you are using Tomcat you can add them to catalina.properties.

If authentication is switched on (Basic or JWT) the Camunda GraphQL Server expects an Authorization-Header in the client request.
GraphQL clients let you define these request headers, e.g. the graphiql-app has a link _Edit HTTP headers

http headers 01

http headers 02

Basic Authentication

To switch to Basic Authentication use:
auth.Filter=BASIC

For example if you have a Camunda user demo with the password demo your Authorization-Header must be:
Key=Authorization
Value=Basic ZGVtbzpkZW1v (why?)


JWT (JSON Web Token) Authentication

To switch to JWT you must set three properties:
auth.Filter=JWT
JWT.secret=Whatever_Random_Secret_String_You_Prefer
JWT.issuer=Usualy_The_Name_Of_Your_Company

A JWT Authorization-Header could look like this:
Key=Authorization
Value=Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjYW11bmRhIiwiZXhwIjoxNDk3NzA4NjY3LCJpYXQiOjE0OTc2MjIyNjcsInVzZXJuYW1lIjoiZGVtbyJ9.Z-7NTGsHYqsEoc98yOgeT5LD9oGnei6jDPs-FQQhqDw

Important!
The GraphQL Server can validate existing JSON Web Token presented in the Authorization-Header based on
JWT.secret
JWT.issuer
(future releases will support private/public key)
but cannot provide or issue them. There is no login functionality "out of the box"
There is no JWT provider build into Camunda GraphQL server, because that does not belong to GraphQL at all.

Workaround (in case you do not have a JWT provider)
To create valid JWTs you need a JWT provider.
A JWT provider for Camunda can be found here: https://github.com/Loydl/camunda-jwt-provider

The JWT.secret and JWT.issuer settings of the

  • JWT provider
  • and the Camunda GraphQL server

must be the same, otherwise the JWT cannot be validated and user do not get authenticated.
(BTW, this is also a good option to basically implement Single Sign On).

Further information about JWT: https://jwt.io

No Authentication

To switch off authentication you simply set:
auth.Filter=NO
or delete this property, e.g. in catalina.properties put it in a comment:
#auth.Filter=xyz
(If the value of auth.Filter is equal JWT or BASIC than authentication is switched on, otherwise it is switched off.)

Goals

  • expose the complete Camunda Java API in GraphQL
  • build modern web and mobile clients for Camunda Platform (freedom to choose your GUI library)
  • build GraphQL-based, customizable versions of Tasklist, Cockpit, Admin
  • Camunda BPM as part of a micro-services architecture. Service accessible through a GraphQL endpoint
    (using GraphQL Schema Stiching to combine many GraphQL endpoints to one GraphQL API gateway)
  • Realtime GUIs (add GraphQL subscriptions to Camunda GraphQL)

Camunda Forum Thread (initial)

https://forum.camunda.org/t/developing-the-camunda-graphql-extension

camunda-platform-7-graphql's People

Contributors

actions-user avatar berndruecker avatar celanthe avatar chaima-mnsr avatar datakurre avatar dependabot[bot] avatar hawky-4s- avatar herr-vogel avatar hkupitz avatar hloydl avatar lwille avatar mark-james avatar mmaico avatar npwork avatar zerounix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camunda-platform-7-graphql's Issues

First release

Are there any plans for a first (alpha) release yet? Could be nice to show people the potential of GraphQL in the Camunda context. The feature set is in my opinion of secondary interest for a first release.

add GraphiQL

Basically this is what has to be done:

Copy the example index.html from GraphiQL’s GitHub repo and replace the paths to graphiql.css and graphiql.js from

<link rel="stylesheet" href="./node_modules/graphiql/graphiql.css" />
<script src="./node_modules/graphiql/graphiql.js"></script>

to

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/graphiql.css" />
<script src="//cdn.jsdelivr.net/npm/[email protected]/graphiql.js"></script>

Save the file to something like src/main/webapp/index.html

Source: https://www.howtographql.com/graphql-java/2-queries/

Share some of the lessons learned from JWT Filter for Camunda

Hi

Could you share some of your lessons learned in setting up the JWT filter?

I am looking to setup a filter that will be using JWT, It will not depend on actual users within the database, only validate the JWT set the username based on the jwt. Actual users within camunda will not exist other than the admin

How to configure the graphql endpoint

I downloaded the camunda-bpm-tomcat-7.6.0.tar.gz package, unpacked, and place the camunda-bpm-graphql-0.1.0-SNAPSHOT.war to $TOMCAT_SERVER_ROOT/webapps, seems like the app is started, but the /graphql return 404.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.1.RELEASE)

2017-05-13 23:43:32.232  INFO 51866 --- [ost-startStop-2] o.c.bpm.extension.graphql.GraphQLServer  : Starting GraphQLServer on localhost with PID 51866 (/Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/server/apache-tomcat-8.0.24/webapps/camunda-bpm-graphql-0.1.0-SNAPSHOT/WEB-INF/classes/org/camunda/bpm/extension/graphql/GraphQLServer.class started by hezhiqiang in /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0)
2017-05-13 23:43:32.237  INFO 51866 --- [ost-startStop-2] o.c.bpm.extension.graphql.GraphQLServer  : No active profile set, falling back to default profiles: default
2017-05-13 23:43:32.465  INFO 51866 --- [ost-startStop-2] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@34a6d8b1: startup date [Sat May 13 23:43:32 CST 2017]; root of context hierarchy
2017-05-13 23:43:33.537  INFO 51866 --- [ost-startStop-2] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration' of type [class org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-05-13 23:43:33.625  INFO 51866 --- [ost-startStop-2] trationDelegate$BeanPostProcessorChecker : Bean 'validator' of type [class org.springframework.validation.beanvalidation.LocalValidatorFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-05-13 23:43:33.646  INFO 51866 --- [ost-startStop-2] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1181 ms
2017-05-13 23:43:34.265  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'errorPageFilter' to: [/*]
2017-05-13 23:43:34.265  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-05-13 23:43:34.266  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-05-13 23:43:34.266  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-05-13 23:43:34.266  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2017-05-13 23:43:34.266  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'corsFilter' to: [/*]
2017-05-13 23:43:34.266  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'camunda-auth' to urls: [/*]
2017-05-13 23:43:34.266  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'simpleGraphQLServlet' to [/]
2017-05-13 23:43:34.269  INFO 51866 --- [ost-startStop-2] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2017-05-13 23:43:34.575  INFO 51866 --- [ost-startStop-2] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@34a6d8b1: startup date [Sat May 13 23:43:32 CST 2017]; root of context hierarchy
2017-05-13 23:43:34.660  INFO 51866 --- [ost-startStop-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-05-13 23:43:34.661  INFO 51866 --- [ost-startStop-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-05-13 23:43:34.690  INFO 51866 --- [ost-startStop-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-05-13 23:43:34.690  INFO 51866 --- [ost-startStop-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-05-13 23:43:34.736  INFO 51866 --- [ost-startStop-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-05-13 23:43:35.255  INFO 51866 --- [ost-startStop-2] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-05-13 23:43:35.270  INFO 51866 --- [ost-startStop-2] o.c.bpm.extension.graphql.GraphQLServer  : Started GraphQLServer in 3.431 seconds (JVM running for 1480.044)
13-May-2017 23:43:35.278 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/server/apache-tomcat-8.0.24/webapps/camunda-bpm-graphql-0.1.0-SNAPSHOT.war has finished in 5,500 ms



13-May-2017 23:46:02.242 INFO [http-nio-8080-exec-7] org.jboss.resteasy.logging.impl.Slf4jLogger.info Deploying javax.ws.rs.core.Application: class org.camunda.bpm.webapp.impl.engine.EngineRestApplication
13-May-2017 23:46:02.242 INFO [http-nio-8080-exec-9] org.jboss.resteasy.logging.impl.Slf4jLogger.info Deploying javax.ws.rs.core.Application: class org.camunda.bpm.admin.impl.web.AdminApplication

Thank you!

Maven-Assembly-Plugin

To create deployments for various target platforms: Tomcat, WildFly, SpringBoot...

Unclear installation instructions - is there a Docker image?

This look like a great product that we plan to use as a remote schema with the Hasura GraphQL server (https://hasura.io).

I currently have the Camunda running using the Docker image and it isn't clear from this repo's documentation which steps are mandatory and which are optional - for example do we really need to build the GraphQL server or can we just grab the .war from the repo (which seems to require another steps This maven2 hosted repository is not directly browseable at this URL.).

I've read the dev thread - and the last post there is pretty similar to my questions - https://forum.camunda.org/t/developing-the-camunda-graphql-extension/2872/36

The best/easiest approach would be a docker container with the GraphQL code in there - do you know if this has been done?

TIA

D.

Compile failed

➜  camunda-bpm-graphql git:(master) ✗ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building camunda-bpm-graphql 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.6:clean (default-clean) @ camunda-bpm-graphql ---
[INFO] Deleting /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/camunda-bpm-graphql/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ camunda-bpm-graphql ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (default) @ camunda-bpm-graphql ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ camunda-bpm-graphql ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ camunda-bpm-graphql ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 12 source files to /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/camunda-bpm-graphql/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/camunda-bpm-graphql/src/main/java/org/camunda/bpm/extension/graphql/resolvers/TaskEntityResolver.java:[11,40] package org.camunda.bpm.engine.rest.util does not exist
[ERROR] /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/camunda-bpm-graphql/src/main/java/org/camunda/bpm/extension/graphql/resolvers/TaskEntityResolver.java:[70,34] cannot find symbol
  symbol:   variable ApplicationContextPathUtil
  location: class org.camunda.bpm.extension.graphql.resolvers.TaskEntityResolver
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.568 s
[INFO] Finished at: 2017-05-13T23:23:50+08:00
[INFO] Final Memory: 26M/258M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project camunda-bpm-graphql: Compilation failure: Compilation failure: 
[ERROR] /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/camunda-bpm-graphql/src/main/java/org/camunda/bpm/extension/graphql/resolvers/TaskEntityResolver.java:[11,40] package org.camunda.bpm.engine.rest.util does not exist
[ERROR] /Users/hezhiqiang/runtimes/camunda-bpm-tomcat-7.6.0/camunda-bpm-graphql/src/main/java/org/camunda/bpm/extension/graphql/resolvers/TaskEntityResolver.java:[70,34] cannot find symbol
[ERROR]   symbol:   variable ApplicationContextPathUtil
[ERROR]   location: class org.camunda.bpm.extension.graphql.resolvers.TaskEntityResolver
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Failing Unit Tests

Can't build a war file as there are failing tests. I'm not really that familiar with these. Is there a way to fix it? Below is a snippet of the stack trace.

image

rename repo to camunda-bpm-graphql

we have naming convention for extensions ... I got used to have everything starting with "camunda-bpm-" ... maybe its a good idea to change this repo before it gets "too big to change"?

How to use 0.1.0-alpha1?

Hi guys,

I just wanted to try out the 0.1.0-alpha1 war, but am not sure how get it working. I tried deploying it on Tomcat and Wildfly 10 (both the Camunda 7.7.0 distributions) and failed both times.

On Tomcat, the deployment is successful, but accessing http://localhost:8080/camunda-bpm-graphql-0.1.0-alpha1/?query={tasks{name}} returns 404.

Deploying to Wildfly 10 fails with the following exception:

2017-08-23 09:37:30,964 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 63) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./graphql: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./graphql: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:236)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
	... 6 more
Caused by: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
	at io.undertow.websockets.jsr.Bootstrap$WebSocketListener.contextInitialized(Bootstrap.java:116)
	at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:200)
	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
	at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
	... 8 more

2017-08-23 09:37:39,186 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "camunda-bpm-graphql-0.1.0-alpha1.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./graphql" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./graphql: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
    Caused by: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
    Caused by: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./graphql"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}

So my question is: Could you please clarify how to deploy and access the web application?

Cheers,
Thorben

GraphiQL: index.html - replace cdn references with locally hosted js/css-files

do not download these 6 files but host them locally :

<script src="//cdn.jsdelivr.net/es6-promise/4.0.5/es6-promise.auto.min.js"></script>
<script src="//cdn.jsdelivr.net/fetch/0.9.0/fetch.min.js"></script>
<script src="//cdn.jsdelivr.net/react/15.4.2/react.min.js"></script>
<script src="//cdn.jsdelivr.net/react/15.4.2/react-dom.min.js"></script>

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/graphiql.css" />
<script src="//cdn.jsdelivr.net/npm/[email protected]/graphiql.js"></script>

Rename extension, update assets & documentation

Hi Marcelo,

I hope today finds you well! This issue is being opened to ask if you would be open to renaming your extension on GitHub to reference Camunda Platform 7 rather than Camunda BPM after its release on April 12th, 2022. (For example: camunda-platform-7-graphql) This change will also likely impact any screenshots you have in the README that reference Camunda BPM or previous versions of Camunda Platform, and this will likely need to also be updated throughout the repo's documentation as a whole. You can also make use of Shields.io badges to indicate which version of Camunda your extension is compatible with.

While it is not a requirement that you rename your extension to align with Camunda Platform 7, we would greatly appreciate it if you could make these changes, and merge them anytime after April 12th, 2022.

if you have any questions or require any assistance, please do not hesitate to reach out to @camunda-community-hub/devrel! :)

wildfly deployment of graphQL server

Hi guys,

I tried running the .war file on a fresh camunda wildfly installation which actually failed because of a missing dependency to camunda bpm engine jboss module. I added this via a jboss-deployment-structure.xml and finally got it working.

Do you have any plans to add this feature, like via a build profile or something, in the future?

I read that you have plans to have some sample ui application, is there already something to have a peek at, because I really plan to use graphql with react for our next workflow application?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.