Errors design #669
Unanswered
lorddaedra
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's assume, we use this schema. We have users and projects. Just after login we make
me
query and load some data, related with user and his(her) projects.Our query:
and on server side we have simple resolver like that:
Let's assume, we have
projects
field somewhere else and now we would like refactor and add separateresolve_projects
resolver.Questions:
Is it good idea to keep all errors only on root level (inside 'data')? I think, answer is 'yes' because of it will simplify error handling a lot.
How to deal with
OperationError
in this case, how to move error fromresolve_projects
to top level of 'data' output (to top parent resolver,resolve_me
or anything else)?Beta Was this translation helpful? Give feedback.
All reactions