Sign inSign up

imega/graphql-playground

By imega

•Updated over 5 years ago

Apollo graphql + playground + your resolvers and schema

Image
0

7.8K

imega/graphql-playground repository overview

⁠Graphql and playground

Build Status

⁠Usage

$ docker run -d -p 4000:4000 imega/graphql-playground:latest
  1. Open URL http://localhost:4000/graphql⁠ in browser
  2. Paste query in editor (left-top)
query getBooks {
    books {
        title
        author
    }
}
  1. Click the play button
  2. The server will response
{
    "data": {
        "books": [
            {
                "title": "Harry Potter and the Chamber of Secrets",
                "author": "J.K. Rowling"
            },
            {
                "title": "Jurassic Park",
                "author": "Michael Crichton"
            }
        ]
    }
}

⁠Your resolver and schema

$ docker run -d -p 4000:4000 \
    -v path/to/my/resolvers:/app/resolvers \
    -v path/to/my/schema:/app/schema \
    imega/graphql-playground:latest

docker-compose.yml

version: "3.3"

services:
    app:
        image: imega/graphql-playground:latest
        volumes:
            - ./resolvers:/app/resolvers
            - ./schema:/app/schema
        ports:
            - 4000:4000

Tag summary

Content type

Image

Digest

Size

67.4 MB

Last updated

over 5 years ago

docker pull imega/graphql-playground