Skip to content

Commit

Permalink
Added better error showing, and updated required dependencies in chec…
Browse files Browse the repository at this point in the history
…kNpmVersions
  • Loading branch information
theodorDiaconu committed Jan 9, 2019
1 parent bc7a4e7 commit dcd3d37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export { load, db, getRenderer };

checkNpmVersions({
'apollo-server-express': '2.x.x',
graphql: '0.13.x',
graphql: '14.x.x',
'graphql-load': '0.1.x',
'graphql-type-json': '0.2.x',
'graphql-tools': '3.x.x',
'graphql-tools': '4.x.x',
});
14 changes: 9 additions & 5 deletions server/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ export default function initialize(apolloConfig = {}, meteorApolloConfig = {}) {
introspection: Meteor.isDevelopment,
debug: Meteor.isDevelopment,
path: '/graphql',
formatError: e => ({
message: e.message,
locations: e.locations,
path: e.path,
}),
formatError: e => {
console.error(e.toString(), '\n', JSON.stringify(e, null, 4));

return {
message: e.message,
locations: e.locations,
path: e.path,
};
},
...initialApolloConfig,
typeDefs,
resolvers,
Expand Down

0 comments on commit dcd3d37

Please sign in to comment.