Skip to content

Commit 104ab0b

Browse files
committed
Merge pull request #5 from graphql/update
Update to work with graphql 0.3.0
2 parents b619640 + da4252c commit 104ab0b

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"babel-runtime": "~5.8.3"
4444
},
4545
"peerDependencies": {
46-
"graphql": "~0.2.6"
46+
"graphql": "~0.3.0"
4747
},
4848
"devDependencies": {
4949
"babel": "5.8.3",
@@ -53,7 +53,7 @@
5353
"chai-as-promised": "5.1.0",
5454
"eslint": "0.24.0",
5555
"flow-bin": "0.13.1",
56-
"graphql": "0.2.6",
56+
"graphql": "0.3.0",
5757
"mocha": "2.2.5",
5858
"sane": "1.1.3"
5959
}

src/mutation/__tests__/mutation.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,17 @@ var schema = new GraphQLSchema({
5757

5858
describe('mutationWithClientMutationId', () => {
5959
describe('Behaves correctly', () => {
60-
it('Requires an argument', () => {
60+
it('Requires an argument', async () => {
6161
var query = `
6262
mutation M {
6363
simpleMutation {
6464
result
6565
}
6666
}
6767
`;
68-
var expected = {
69-
errors: [{
70-
locations: [
71-
{
72-
column: 11,
73-
line: 3
74-
}
75-
],
76-
message: 'Field \"simpleMutation\" argument \"input\" of type \"SimpleMutationInput!\" is required but not provided.',
77-
}]
78-
};
79-
return expect(graphql(schema, query)).to.become(expected);
68+
var result = await graphql(schema, query);
69+
expect(result.errors.length).to.equal(1);
70+
expect(result.errors[0].message).to.equal('Field \"simpleMutation\" argument \"input\" of type \"SimpleMutationInput!\" is required but not provided.');
8071
});
8172

8273
it('Returns the same client mutation ID', () => {

0 commit comments

Comments
 (0)