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/99de4d5c9e89401eecf3b8be7ec91f87 to your computer and use it in GitHub Desktop.
Save gufranmirza/99de4d5c9e89401eecf3b8be7ec91f87 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 getUserByUsername = `
{
getUserByUsername(username: 1, name: test) {
email
}
}
`
tester.test(true, getUserByUsername) // Error: username argument is not type String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment