andreas / ocaml-graphql-server

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

@defer and @stream directive support? #193

Open sgrove opened 4 years ago

sgrove commented 4 years ago

Looks like these two directives will go into the spec soon - any thoughts on how OGS should approach adding them in?

andreas commented 4 years ago

Between the two of them, I think @defer will be the easiest to add, as it doesn't require anything special from the resolver. To support @stream, the resolver for a list field needs to be able to return a stream of values, which is more tricky. It seems like there are still a lot of details to be worked out for @defer and @stream in the spec though.