Re-add default query

This commit is contained in:
Barry Low committed 2018-10-12 13:25:04 -07:00
1 parent a4ee530bc9
commit 4bf253ccaa
2 files changed
+18 -1

No files matched your search

+1
View File
@@ -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**
+17 -1
View File
@@ -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
}
]
}
})