Skip to content

Instantly share code, notes, and snippets.

@gufranmirza
Created June 25, 2019 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gufranmirza/db181af0fde34c2ebd2c1572a416d39d to your computer and use it in GitHub Desktop.
Save gufranmirza/db181af0fde34c2ebd2c1572a416d39d to your computer and use it in GitHub Desktop.
const EasyGraphQLTester = require('easygraphql-tester')
const fs = require('fs')
const path = require('path')
const schemaCode = fs.readFileSync(path.join(__dirname, 'schema', 'schema.gql'), 'utf8')
const tester = new EasyGraphQLTester(schemaCode)
const query = `
{
getMe {
id
email
familyInfo {
father {
id
email
}
}
}
}
`
tester.test(true, query) // Error: Invalid field id on getMe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment