Skip to content

Instantly share code, notes, and snippets.

@shailen-naidoo
Created April 20, 2019 11:08
Show Gist options
  • Save shailen-naidoo/9cd87a7451764291deb05c1c971c9ca7 to your computer and use it in GitHub Desktop.
Save shailen-naidoo/9cd87a7451764291deb05c1c971c9ca7 to your computer and use it in GitHub Desktop.
const { gql } = require('apollo-server-express');
const { typeQuery, typePerson } = require(./index);
test('check if type Query has correct fields', () => {
expect(typeQuery).toBe(gql`
type Query {
_: Boolean
}
`);
});
test('check if type Person has correct fields', () => {
expect(typePerson).toBe(gql`
type Person {
name: String!
surname: String!
}
extend type Query {
person: Person!
}
`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment