From 4bf253ccaa7c9e0d2b2e02282a93ae350b1cfa16 Mon Sep 17 00:00:00 2001 From: Barry Low Date: Fri, 12 Oct 2018 13:25:04 -0700 Subject: [PATCH] Re-add default query --- README.md | 1 + server/src/index.js | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6aa3c0886..3735aec60 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Start the server: ``` npm run start ``` +The Graphql Playground will be viewable at [http://localhost:4100/graphql](http://localhost:4100/graphql) **Setup Client** diff --git a/server/src/index.js b/server/src/index.js index d512c7cfd..4224f71b7 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -33,6 +33,16 @@ async function run () { resolvers }) + const defaultQuery = `{ + teams_Teams{ + edges{ + node{ + name + } + } + } +} +` const app = express() const server = new ApolloServer({ schema, @@ -46,7 +56,13 @@ async function run () { return response; }, playground: { - settings: { 'editor.theme': 'light' } + settings: { 'editor.theme': 'light' }, + tabs: [ + { + endpoint: 'http://localhost:4100/graphql', + query: defaultQuery + } + ] } })