Apollo-server: Errors in server console

Created on 10 Nov 2016  路  5Comments  路  Source: apollographql/apollo-server

Hi,
Is there any way to mute/catch error which appearing in the server console, when I run mutations which throws an error?

I've included a simple case on GitHub (https://github.com/mzygmunt/graphql-server-issue). When I run mutation, then I get the following error in the console:

image

Most helpful comment

You can pass debug: false as part of the options, which should stop errors from being printed to the console. I have a feeling that maybe the option isn't documented yet...

All 5 comments

Experiencing the same, would find it useful to suppress these errors.

You can pass debug: false as part of the options, which should stop errors from being printed to the console. I have a feeling that maybe the option isn't documented yet...

You are right it is documented on dev.apollodata.com. However it is missing from the Readme.md.
// a boolean option that will trigger additional debug logging if execution errors occur
debug?: boolean

@helfer It worked for me. Thanks

@helfer For me too!!! thanks!!!

Was this page helpful?
0 / 5 - 0 ratings