Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
modified gitignore so it doesn't throw away gitignore and added rejec…
Browse files Browse the repository at this point in the history
…tion of errors
  • Loading branch information
Poincare committed Jan 3, 2017
1 parent a34f497 commit 0624411
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ npm
# alm editor
.alm

# output from the build tools
extracted_queries.json
# output from the build tools in the root
./extracted_queries.json
2 changes: 2 additions & 0 deletions src/server/serverUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export function createPersistedQueryMiddleware(
next();
};
resolve(middleware);
}).catch((err: Error) => {
reject(err);
});
});
}
1 change: 1 addition & 0 deletions test/fixtures/extracted_queries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"{\n author {\n firstName\n lastName\n }\n}":{"transformedQuery":{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":null,"name":{"kind":"Name","value":"author","loc":{"start":10,"end":16}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":null,"name":{"kind":"Name","value":"firstName","loc":{"start":23,"end":32}},"arguments":[],"directives":[],"selectionSet":null,"loc":{"start":23,"end":32}},{"kind":"Field","alias":null,"name":{"kind":"Name","value":"lastName","loc":{"start":37,"end":45}},"arguments":[],"directives":[],"selectionSet":null,"loc":{"start":37,"end":45}}],"loc":{"start":17,"end":49}},"loc":{"start":10,"end":49}}],"loc":{"start":6,"end":51}},"loc":{"start":0,"end":51}}]},"id":1},"query otherQuery {\n person {\n firstName\n lastName\n }\n}":{"transformedQuery":{"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"otherQuery","loc":{"start":59,"end":69}},"variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":null,"name":{"kind":"Name","value":"person","loc":{"start":74,"end":80}},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":null,"name":{"kind":"Name","value":"firstName","loc":{"start":87,"end":96}},"arguments":[],"directives":[],"selectionSet":null,"loc":{"start":87,"end":96}},{"kind":"Field","alias":null,"name":{"kind":"Name","value":"lastName","loc":{"start":101,"end":109}},"arguments":[],"directives":[],"selectionSet":null,"loc":{"start":101,"end":109}}],"loc":{"start":81,"end":113}},"loc":{"start":74,"end":113}}],"loc":{"start":70,"end":115}},"loc":{"start":53,"end":115}}]},"id":2}}
1 change: 1 addition & 0 deletions test/server/serverUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('serverUtil', () => {
const queryMapPath = 'test/fixtures/extracted_queries.json';
it('it should resolve the returned promise with something', (done) => {
createPersistedQueryMiddleware('test/fixtures/extracted_queries.json').then((middleware) => {
console.log('Something happened at the very least.');
assert(middleware);
done();
});
Expand Down

0 comments on commit 0624411

Please sign in to comment.