Apollo-client: Disable console.warn by default

Created on 20 Aug 2019  路  3Comments  路  Source: apollographql/apollo-client

As a library, it's a bad practice to use console.warn or writing anything to the console by default. It should be possible to disable this behavior.

Use case: I'm using apollo-client to test a graphql API in Node.js and it pollutes my test outputs with unnecessary text.

Most helpful comment

That's not an option as it would break code which assumes process.env.NODE_ENV == "test".

All 3 comments

You can set process.env.NODE_ENV to production, which will suppress all development warnings.

That's not an option as it would break code which assumes process.env.NODE_ENV == "test".

Please open a feature request for this in https://github.com/apollographql/apollo-feature-requests. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stubailo picture stubailo  路  3Comments

dispix picture dispix  路  3Comments

rafgraph picture rafgraph  路  3Comments

canercandan picture canercandan  路  3Comments

stubailo picture stubailo  路  3Comments