You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can copy this file which initializes the offix client. You might need to change the server urls and any other config we already have for the current set up. You can also comment out/remove the mutationCacheUpdates bit for now.
Within the App Component itself, you will still use the ApolloProvider component, but there is some extra code needed to get things to work. Instead of requiring and creating an Apollo Client the normal way, you will get the Apollo Client that comes from the offix client. You can see that being done here: https://github.com/darahayes/offix-example-react/blob/master/src/components/App.tsx#L31-L56
Once that's done, the client app should work as it has before with no noticeable difference. Ping @milenazuccarelli
The text was updated successfully, but these errors were encountered:
npm.im/offix-client can be used almost as a drop in replacement for apollo client.
There are a couple of minor things that need to be done to get it into the app properly.
I just started working on a very basic React app that uses offix-client which has some patterns for integrating and using the offix client.
https://github.com/darahayes/offix-example-react
There are a couple of key things to be aware of.
<OffixProvider>
component. This is similar to what is probably being done already withApolloProvider
. You can see that being done here: https://github.com/darahayes/offix-example-react/blob/master/src/index.tsx#L9-L16ApolloProvider
component, but there is some extra code needed to get things to work. Instead of requiring and creating an Apollo Client the normal way, you will get the Apollo Client that comes from the offix client. You can see that being done here: https://github.com/darahayes/offix-example-react/blob/master/src/components/App.tsx#L31-L56Once that's done, the client app should work as it has before with no noticeable difference. Ping @milenazuccarelli
The text was updated successfully, but these errors were encountered: