Skip to content

Commit

Permalink
rename property executionPath to path
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava committed Jun 10, 2016
1 parent 8c1cb24 commit 955c0a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/__tests__/starWarsQuery-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ describe('Star Wars Query Tests', () => {
expect(result.data).to.deep.equal(expected);
expect(result.errors.map(e => e.message)).to.deep.equal(expectedErrors);
expect(
result.errors.map(e => e.executionPath)).to.deep.equal(
result.errors.map(e => e.path)).to.deep.equal(
[ [ 'hero', 'secretBackstory' ] ]);
});

Expand Down Expand Up @@ -430,7 +430,7 @@ describe('Star Wars Query Tests', () => {
expect(result.data).to.deep.equal(expected);
expect(result.errors.map(e => e.message)).to.deep.equal(expectedErrors);
expect(
result.errors.map(e => e.executionPath)
result.errors.map(e => e.path)
).to.deep.equal(
[
[ 'hero', 'friends', 0, 'secretBackstory' ],
Expand Down Expand Up @@ -461,7 +461,7 @@ describe('Star Wars Query Tests', () => {
expect(result.data).to.deep.equal(expected);
expect(result.errors.map(e => e.message)).to.deep.equal(expectedErrors);
expect(
result.errors.map(e => e.executionPath)
result.errors.map(e => e.path)
).to.deep.equal([ [ 'mainHero', 'story' ] ]);
});

Expand Down
2 changes: 1 addition & 1 deletion src/error/GraphQLError.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class GraphQLError extends Error {
source: Source;
positions: Array<number>;
locations: any;
executionPath: Array<string | number>;
path: Array<string | number>;
originalError: ?Error;

constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/error/locatedError.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export function locatedError(
const stack = originalError ? originalError.stack : null;
const error = new GraphQLError(message, nodes, stack);
error.originalError = originalError;
error.executionPath = path;
error.path = path;
return error;
}

0 comments on commit 955c0a8

Please sign in to comment.