aerogear / offix

GraphQL Offline Client and Server
https://offix.dev
Apache License 2.0
760 stars 45 forks source link

Add support for useQuery and useMutation for react-offix-hooks #293

Closed krunaldodiya closed 4 years ago

krunaldodiya commented 4 years ago

Add support for useQuery, useMutation and useSubscription for react-offix-hooks,

currently it has only useOfflineHooks but for queries we need to import from original react-hooks, managing hooks from 2 different library is cumbersome, please add support so that we can import all in one library :)

wtrocki commented 4 years ago

That will be our no1 priority for next release.

wtrocki commented 4 years ago

Ping @darahayes

darahayes commented 4 years ago

@kunaldodiya One of the main reasons we did it this way is because @apollo/react-hooks is not the only React hooks library available for Apollo Client. As a team we decided to provide our own implementation for the offline functionality and then allow users have the flexibility to choose which pre existing hooks library they want for all other operations (mutations, queries, subscriptions) and not force them to import packages they possibly do not require.

I'm going to close this issue for now, but if you feel strongly about it, you are more than welcome to reopen it and we can have a discussion.