Last active
December 6, 2018 18:05
-
-
Save gtkatakura-bysoft/fa4cdffa9c8b7e2e275dc58b5d705c5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { introspectionQuery, buildClientSchema } = require('graphql') | |
| const { validate } = require('graphql/validation') | |
| const fetch = require('graphql-fetch') | |
| const { gql } = require('apollo-boost') | |
| const GET_HELLO = gql` | |
| query HelloWorldQuery { | |
| hell | |
| } | |
| ` | |
| fetch('http://localhost:4000')(introspectionQuery).then(function (results) { | |
| const schema = buildClientSchema(results.data) | |
| console.log(validate(schema, GET_HELLO)) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.