by tobase on 1/16/23, 7:03 PM with 11 comments
by satvikpendem on 1/16/23, 8:13 PM
This article is interesting, however it seems `@live` isn't part of the official specification. Also, you can use something like TanStack Query to synchronize server state, which works with GraphQL as well as regular REST, or you can use a GraphQL client directly like Apollo or urql, which also does the same syncing, so I'm not sure for what purpose this directive serves exactly. Maybe it's for languages that don't have a good server side syncing library?
by Emigre_ on 1/16/23, 8:58 PM
by vlaaad on 1/16/23, 8:24 PM
You can define a query on any API, be it GraphQL or REST, and a jq query to extract events, and you are good to go. I wonder if this @live directive is implemented with polling?