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

Example on using pollInterval query

Open iamchathu opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. I'm using graphql: ^4.0.1 package. Using client.query with FutureBuilder.

I'm tried to set PollInterval but I don't know how does it works. Does it return a Stream so I can use a stream builder to subscribe to it. Currently it returns only Future.

Describe the solution you'd like Example How to use PollInterval in graphql

Describe alternatives you've considered Alternative seems to move to graphql_flutter package and use Query Widget. I'm not sure it get updated on the Poll interval

Additional context

iamchathu avatar Mar 30 '21 14:03 iamchathu

pollInterval only does something with client.watchQuery and Query from graphql_flutter – #841. It tells the query manager to refetch from the server on a regular basis and add to the ObservableQuery.stream

micimize avatar Apr 06 '21 14:04 micimize