Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

throw from resolver should not be logged #1978

Closed
steida opened this issue Feb 26, 2018 · 2 comments
Closed

throw from resolver should not be logged #1978

steida opened this issue Feb 26, 2018 · 2 comments

Comments

@steida
Copy link

steida commented Feb 26, 2018

Maybe I am wrong, but

const throwError = (error /*: ServerError */) => {
  throw new Error(JSON.stringify(error));
};

const throwNotAuthorizedError = () => throwError({ type: 'notAuthorized' });

Seems to be a recommended way how to stop resolver, but then probably this should not be logged.

screen shot 2018-02-26 at 02 03 45

@marktani
Copy link
Contributor

marktani commented Mar 2, 2018

Issue moved to graphcool/graphql-yoga #199 via ZenHub

@marktani
Copy link
Contributor

marktani commented Mar 2, 2018

Thanks for opening this discussion, I moved it here: dotansimha/graphql-yoga#199.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants