diff --git a/server/index.js b/server/index.js index e8481d7..8eec64d 100644 --- a/server/index.js +++ b/server/index.js @@ -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', }); diff --git a/server/initialize.js b/server/initialize.js index dbae9c0..8eb6903 100644 --- a/server/initialize.js +++ b/server/initialize.js @@ -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,