Skip to content

samuelAndalon/graphql-kotlin-batching-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

graphql-kotlin-v6-demo

APQ

First Request without query and with sha256Hash

curl --request POST \
  --url http://localhost:8080/graphql \
  --header 'Content-Type: application/json' \
  --data '{
	"variables": {
		"id": 2
	},
	"extensions": {
    "persistedQuery": {
      "version": 1,
      "sha256Hash": "8e6247c8567059f28db2851068942c288a350017db67e1e15ad41304635b6f3f"
    }
  }
}'

Second Request with query and with sha256Hash

curl --request POST \
  --url http://localhost:8080/graphql \
  --header 'Content-Type: application/json' \
  --data '{
	"operationName": "getUser",
	"query": "query getUser($id: Int!) { user(id: $id) { id name lastName } }",
	"variables": {
		"id": 1
	},
	"extensions": {
    "persistedQuery": {
      "version": 1,
      "sha256Hash": "8e6247c8567059f28db2851068942c288a350017db67e1e15ad41304635b6f3f"
    }
  }
}'

Batching

curl --request POST \
  --url http://localhost:8080/graphql \
  --header 'Content-Type: application/json' \
  --data '[
	{
		"operationName": "getUser",
		"query": "query getUser($id: Int!) { user(id: $id) { id name lastName } }",
		"variables": {
			"id": 1
		}
	},
	{
		"operationName": "getUser",
		"query": "query getUser($id: Int!) { user(id: $id) { id name lastName } }",
		"variables": {
			"id": 2
		}
	}
]'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages