andreas/ocaml-graphql-server

Allow resolvers to return data *and* errors?

Opened this issue · 0 comments

Right now a single field must return either data xor error, but this is especially lossy for list io_field types. I may succeed on 80/100 items I need (and would like to show to the user), but the errors may be critical, so I discard the 80 items I did retrieve in favor of reporting the 20 errors I encountered.

I know the idea has been brought up before, but I couldn't find it in the list, so asking in case there are any ideas of how this could be represented.