Skip to content

Commit

Permalink
fix: never silence errors (#313)
Browse files Browse the repository at this point in the history
I just lost 3 hours of my life not understanding why the `dataSources` field of the third argument of my resolvers were `undefined`.
Just a missing parenthesis, hard to see without an error log of the error.

Please never silence errors again, thank you :)
  • Loading branch information
linkdd authored Jun 8, 2020
1 parent a526961 commit 208cfa7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion graphql-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ module.exports = (options, cb = null) => {
let dataSources
try {
dataSources = load(options.paths.dataSources)
} catch (e) {}
} catch (e) {
console.error(e)
}

// GraphQL API Server

Expand All @@ -50,6 +52,7 @@ module.exports = (options, cb = null) => {
const serverModule = load(options.paths.server)
serverModule(app)
} catch (e) {
console.error(e)
// No file found
}

Expand Down

0 comments on commit 208cfa7

Please sign in to comment.