Skip to content

Instantly share code, notes, and snippets.

@gufranmirza
Created June 25, 2019 14:31
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/f9aa78399264d0366d10d38d5d77b67e to your computer and use it in GitHub Desktop.
Save gufranmirza/f9aa78399264d0366d10d38d5d77b67e 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 mutation = `
mutation CreateUser{
createUser {
email
}
}
`
const test = tester.test(true, mutation, {
email: 'test@test.com',
fullName: 'test',
password: 'test'
})
// Error: username argument is missing on createUser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment