项目作者: ashutoshsahoo

项目描述 :
Spring boot and GraphQL Playground
高级语言: Java
项目地址: git://github.com/ashutoshsahoo/gs-graphql-practice.git
创建时间: 2020-05-23T06:13:36Z
项目社区:https://github.com/ashutoshsahoo/gs-graphql-practice

开源协议:

下载


Spring Boot with GraphQL (GraphQL Playground)

Getting Started

Run application

  • Run the application using gradle bootRun

  • Open http://localhost:8080/graphiql in browser

Test Application

  • Query Employee
  1. {
  2. employees {
  3. id
  4. name
  5. salary
  6. }
  7. }

and inside REQUEST HEADERS

  1. {
  2. "Authorization": "Basic YWRtaW46YWRtaW4="
  3. }

Response :

  1. {
  2. "data": {
  3. "employees": [
  4. {
  5. "id": "1",
  6. "name": "Andi",
  7. "salary": "42"
  8. }
  9. ]
  10. }
  11. }

Run application inside docker

  1. gradle build
  2. gradle jibDockerBuild
  3. docker run -d -p 8080:8080 ashutoshsahoo/gs-graphql
  4. docker ps
  5. docker stop <container-id>
  6. docker rm <container-id>

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

These additional references should also help you: