kevinrodriguez-io / flutter_graphql_hooks

Apollo-like set of hooks to be used with flutter
MIT License
11 stars 0 forks source link

Adding the fetchMore function #4

Open Rasmunis opened 3 years ago

Rasmunis commented 3 years ago

Hello again

I see that useQuery returns a refetch-function, here called fetch, but I can't find any support for the fetchMore-function used for pagination.

Is it possible to add this?

kevinrodriguez-io commented 3 years ago

Hi @Rasmunis ! That's an intresting one because It basically has to append to the items that are already on the array. Definetly can be done, I just need some time to peek on how is it supposed to work.

kevinrodriguez-io commented 3 years ago

@Rasmunis Some heads up on this

https://github.com/mainawycliffe/graphql-flutter/blob/fetchmore/packages/graphql_flutter/example/lib/fetchmore/main.dart

I can add fetchMore as another parameter for query and lazyQuery hooks. But at this point I'm still working on this.