andreas / ocaml-graphql-server

GraphQL servers in OCaml
MIT License
624 stars 60 forks source link

Allow resolvers to return data *and* errors? #192

Open sgrove opened 4 years ago

sgrove commented 4 years ago

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.