Code Monkey home page Code Monkey logo

Comments (7)

evelant avatar evelant commented on May 18, 2024 1

Unfortunately my team has decided not to use apollo/graphql for our latest project so I won't have time to contribute here for some time. I think this issue can be closed since it sounds like the storage abstraction should render it a non-issue.

from offix.

wtrocki avatar wtrocki commented on May 18, 2024

We have integration test that tests default storage, but we do not test async store/react native case. I will try to test that early in the morning and see what is actually saved to store. Please use previos version for now.

from offix.

wtrocki avatar wtrocki commented on May 18, 2024

@AndrewMorsillo I will need your help with this.
I haven't changed anything in the codebase apart from package renames so the code will be 100% the same. React Native support is still in progress in #24
I have tested that using window.localStorage as store and it works ok because returned data is a string.

I will need the following details in order to assist here:

  1. Dropping your client configuration into this PR #24
    Configuration was mentioned in #23 but we will need the package to test it.

  2. If you have some basic app do you mind dropping that into: https://github.com/graphql-heroes/offix-react-native-example

You should have full access rights for both repositories.

from offix.

wtrocki avatar wtrocki commented on May 18, 2024

@AndrewMorsillo I think that we need to simply check if object needs to be parsed or it is actual js object. window.localStorage returns string and current implementation support is. Not sure what AsyncStore we have been using for this. Once we get some changes into the React Native we will unify interface.

I think we need to have a wrapper for window.localStorage and our interface will always return Promise<OfflineEntry[]> and we will no longer perform JSON.parse/stringify on the store. We cannot use official AsyncStore for React Native as it is deprecated.

from offix.

evelant avatar evelant commented on May 18, 2024

Thanks for making that repo. I'm working on an example project hopefully to be ready in the next few days. I'll be sure to push it there.

I'll be investigating the AsyncStorage thing today. Got delayed yesterday because I didn't realize that react native bundler (metro) doesn't work with symlinks (npm link) so I had a hard time setting up a local copy of offix-client.

I'm pretty new to graphql, react-native, expo, and developing npm libraries so it may take me a bit. A lot to learn!

from offix.

wtrocki avatar wtrocki commented on May 18, 2024

We have done a couple of improvements to abstract storage interface inside offix and hoping to release new version over the comming days. So most of the problems should dissapear and things should work out of the box.

from offix.

wtrocki avatar wtrocki commented on May 18, 2024

@AndrewMorsillo Thank you so much for the update!

from offix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.