Skip to content

Commit

Permalink
Merge pull request #1 from ivy-lmu/readme
Browse files Browse the repository at this point in the history
add docu
  • Loading branch information
ivy-lmu authored Sep 29, 2023
2 parents 800f971 + e95d7a4 commit c1f479c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GraphQL Demo

[![CI Build](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml/badge.svg)](https://github.com/axonivy-market/REPO-NAME/actions/workflows/ci.yml)
[![CI Build](https://github.com/ivy-lmu/graphql-demo/actions/workflows/ci.yml/badge.svg)](https://github.com/ivy-lmu/graphql-demo/actions/workflows/ci.yml)

"YOUR SHORT DESCRIPTION GOES HERE"
Demonstration of a GraphQL endpoint that allows clients to query for tasks and users.

Read our [documentation](graphql-demo-product/README.md).
22 changes: 16 additions & 6 deletions graphql-demo-product/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# GraphQL Demo

YOUR DESCRIPTION GOES HERE
This Demo provides a GraphQL endpoint running with the Ivy Engine.
The endpoint supports querying tasks and users and allows creating new users.
For more information, see the [GraphQL](https://community.axonivy.com/d/526-graphql) community post.

## Demo

YOUR DEMO DESCRIPTION GOES HERE
For the following demonstration of sending queries to the endpoint, the [Altair GraphQL Client](https://altairgraphql.dev) is used.
This client is available for most common platforms.
Any other client that can send POST requests can be used instead.


![Query for all tasks](assets/all-tasks.gif)
![Query for tasks with state filter](assets/task-by-state.gif)
![Create new user](assets/create-user.gif)

## Setup

YOUR SETUP DESCRIPTION GOES HERE
No special setup is required on Ivy Engine side.
The GraphQL Resource `com.axonivy.demo.graphql.resource.GraphQLResource` is automatically detected and published by the Ivy Engine.
Then the endpoint is accessible via `http://your-ivy-engine-url/your-application/api/graphql`, e.g. `http://localhost:8081/designer/api/graphql`.


```
@variables.yaml@
```
On client side the header `X-Requested-By` must be set, e.g. to `myClient` to make valid POST requests.
Binary file added graphql-demo-product/assets/all-tasks.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphql-demo-product/assets/create-user.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphql-demo-product/assets/task-by-state.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions graphql-demo-product/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"$schema": "https://json-schema.axonivy.com/market/10.0.0/product.json",
"installers": [
{
"id": "maven-dependency",
"id": "maven-import",
"data": {
"dependencies": [
"projects": [
{
"groupId": "com.axonivy.demo.graphql",
"artifactId": "graphql-demo",
Expand Down

0 comments on commit c1f479c

Please sign in to comment.