Skip to content

Apollo graphql + playground + your resolvers and schema

Notifications You must be signed in to change notification settings

imega-docker/graphql-playground

Repository files navigation

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

About

Apollo graphql + playground + your resolvers and schema

Resources

Stars

Watchers

Forks

Packages

No packages published