reactive-graphql icon indicating copy to clipboard operation
reactive-graphql copied to clipboard

[Feature] Proper support for @live directive + support @defer directive

Open alexstrat opened this issue 5 years ago • 1 comments

As of today, any query and the whole query is considered as @live query (ie queries for which we emit results when it changes).

I think proper support for the @live directive should look like this:

  • result of executing a query is not live if the directive is not present: it produces an Observable that completes after the first result
  • only specific fields can be marked as @live or the whole operation can be marked as @live

Support for @defer directive.

alexstrat avatar Sep 23 '19 16:09 alexstrat

Sounds like a good idea, we just need to add a pipe(take(1)) if there is a directive present

DanielMSchmidt avatar Sep 23 '19 21:09 DanielMSchmidt