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

[Feature] Live query params

Open DanielMSchmidt opened this issue 6 years ago • 0 comments
trafficstars

If you want to implement a query that reacts to changing inputs you currently have to retrigger the query with new query params. This means that you need to take care of writing your own caching / refetching logic for this. Instead, you could make it simpler by adding support for live query params that allow you to change the graphql query variables on the fly for certain params, without recreating a new observable

type Query {
  searchKittens($name: String!): [Kittens!]! @liveArgument("name")
}

Would give you an argument object like this { name: Observable<string> } in the resolver

DanielMSchmidt avatar Sep 30 '19 13:09 DanielMSchmidt