Prisma1: Live Query support

Created on 8 Nov 2017  ·  5Comments  ·  Source: prisma/prisma1

What feature are you missing?

While not yet part of GraphQL specification, this is a tentative request for live query support: including defer, live and stream directives.

Reference:

How could this feature look like in detail? Tradeoffs?

  feed {
    stories {
      author { name }
      message
      likeCount @live
    }
  }
}
kinfeature

Most helpful comment

To be honest, Apollo has been very, very silent about it for over a year (that's how old the roadmap is). Same goes for the GraphQL spec.

It's not total radio silence: “Support for these is now possible with Apollo Link, which can accept multiple results from an…” — @jbaxleyiii https://dev-blog.apollodata.com/apollo-client-2-0-5c8d0affcec7

Apparently Apollo Link uses observables to support live queries.

So with no movement on the client side, the spec side, and the server side, I'm afraid this isn't going anywhere any time soon.

If nothing else, here's a place for the Graphcool community to +1

All 5 comments

To be honest, Apollo has been very, very silent about it for over a year (that's how old the roadmap is). Same goes for the GraphQL spec. Relay Modern supports 'live queries' by setting a poll interval, and just executing the same query every time, which in all honesty, has nothing to do with the proposed workings of live queries (getting deltas pushed).

So with no movement on the client side, the spec side, and the server side, I'm afraid this isn't going anywhere any time soon.

To be honest, Apollo has been very, very silent about it for over a year (that's how old the roadmap is). Same goes for the GraphQL spec.

It's not total radio silence: “Support for these is now possible with Apollo Link, which can accept multiple results from an…” — @jbaxleyiii https://dev-blog.apollodata.com/apollo-client-2-0-5c8d0affcec7

Apparently Apollo Link uses observables to support live queries.

So with no movement on the client side, the spec side, and the server side, I'm afraid this isn't going anywhere any time soon.

If nothing else, here's a place for the Graphcool community to +1

I think Prisma's database oriented conventions empower it to implement live queries. Apollo and Relay don't have structured database rules. All queries and subscriptions in Prisma have a where input. Basically, if you put the where and what (the what is the queried fields) of the query into a subscription, you could recompute the query everytime the subscription fires. Get fancier on the client, you could patch using the subscription instead of refetching. My point, it could be built directly atop subscriptions because Prisma's so structured.

My biggest issue with Prisma right now is that subscriptions seem to receive in other windows and other tabs. I want them to receive in the same client/tab that caused the mutation, so I can jerry rig my live queries client-side in the interim.

This would help a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marticrespi picture marticrespi  ·  34Comments

schickling picture schickling  ·  36Comments

schickling picture schickling  ·  44Comments

marktani picture marktani  ·  34Comments

marktani picture marktani  ·  62Comments