-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native: Response not successful #13
Comments
Hey, can you show the query itself ? |
Sure, the following query works, but without persist data: query MyQuery {
pokemon(name: "Bulbasaur") @persist {
name
}
} And this one returns an error (like the print screen): query MyQuery {
pokemon(name: "Bulbasaur") {
name
}
} |
More details:
|
Hey from the tests I made, the addPersistField is the one triggering the error. Removing it allows for queries to work but there is no persistence. Keeping it forces the use of |
@danilowoz it would seem that the |
I think I found the problem. In the implementation of |
Hey @lukadriel7 I have tested what you said and I'm not getting the Error status code 400 anymore, but the query still doesn't persist on my storage. Thanks for debugging |
I think that might be because this package doesn't natively support asynchronous storage options. You have to implement at least the denormalize part. Not sure about normalize, I haven't tried yet. |
@danilowoz This is the code I used for localforage. Not sure if it is perfect but it works for both localforage(async) and localstorage(sync).
|
hey guys! good to see this lib is being used in React Native. @lukadriel7 could you ping me at twitter or spectrum.chat to give you write permissions? my handler is the same @sebas5384 |
@sebas5384 I sent you a message on spectrum |
@lukadriel7 hope you received the invitation 😉 |
@lukadriel7 @sebas5384 @danilowoz Just curious if anyone made any progress with this. I'm having the issue that my data is persisting in AsyncStorage as expected, but the value of the For example, this correctly shows the data in storage;
I've tried calling with and without |
We've tried with the code submitted above by @lukadriel7 , but we get one error:
And lots of warnings, attached screenshot. @danilowoz Could you ever run it successfully on React Native? Thanks, |
Hey, nice to see this elegant solution for persisting data, but I'm facing some issue on React Native implementation.
My Apollo client configuration:
Problem:
On the first query, I'm not using the directive
@persist
, then I'm getting the following message on the simulator:And even if I add the directive, it still doesn't save the data.
Any idea about it?
The text was updated successfully, but these errors were encountered: