diff --git a/package.json b/package.json index 30c225c..343b20d 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-runtime": "~5.8.3" }, "peerDependencies": { - "graphql": "~0.2.6" + "graphql": "~0.3.0" }, "devDependencies": { "babel": "5.8.3", @@ -53,7 +53,7 @@ "chai-as-promised": "5.1.0", "eslint": "0.24.0", "flow-bin": "0.13.1", - "graphql": "0.2.6", + "graphql": "0.3.0", "mocha": "2.2.5", "sane": "1.1.3" } diff --git a/src/mutation/__tests__/mutation.js b/src/mutation/__tests__/mutation.js index bd6c125..36689d9 100644 --- a/src/mutation/__tests__/mutation.js +++ b/src/mutation/__tests__/mutation.js @@ -57,7 +57,7 @@ var schema = new GraphQLSchema({ describe('mutationWithClientMutationId', () => { describe('Behaves correctly', () => { - it('Requires an argument', () => { + it('Requires an argument', async () => { var query = ` mutation M { simpleMutation { @@ -65,18 +65,9 @@ describe('mutationWithClientMutationId', () => { } } `; - var expected = { - errors: [{ - locations: [ - { - column: 11, - line: 3 - } - ], - message: 'Field \"simpleMutation\" argument \"input\" of type \"SimpleMutationInput!\" is required but not provided.', - }] - }; - return expect(graphql(schema, query)).to.become(expected); + var result = await graphql(schema, query); + expect(result.errors.length).to.equal(1); + expect(result.errors[0].message).to.equal('Field \"simpleMutation\" argument \"input\" of type \"SimpleMutationInput!\" is required but not provided.'); }); it('Returns the same client mutation ID', () => {