-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support inline fragments for diffing + remove Node refetching code #175
Conversation
Note: To properly evaluate fragments, we need |
@jbaxleyiii just wanted to get a sanity check from you - this PR removes a bunch of code around refetching individual nodes that we weren't actually using in the public API at all. If we put it back, it should be as a diffing plugin a la #26 Also, I left some of the old tests in a commented file, should I do that or just delete stuff altogether? |
Deleted the commented code, we can always get it later if we want it. |
The code you're talking about is still there: https://github.com/apollostack/apollo-client/pull/175/files#diff-f3e452947f5135c9e8a6f750e40ccb32R262 What I removed is the ability to print Relay-style |
I'd like to merge this soon, let me know if I can clarify better what I'm getting rid of. |
@stubailo ah! I get it, 🎉 merge through! |
@stubailo node(id: 'somePersonId') {... on Person { email } } is this now supported in 3.0.2? I'm a little confused with a previous comment ...
and PR #179 If it's supported, this is excellent news. When do you think 3.0.2 will be published to NPM ? (I guess this is also a Q for the react-apollo module) |
@WilliamHolmes it should already be published, I think? Try I think my comment about Relay nodes is a bit confusing - it's safe to just ignore it, I'm just trying to say that I removed some code that didn't fully work anyway. Inline fragments should work everywhere now, let me know if they don't. |
Hi @stubailo, Here is my query:
Using this query with graphiql works perfectly. With apollo client (v 3.2.6) there occurs the following error:
The response from apollo server looks good:
The client seems to use the fields from within the first fragment also within the second? |
Hi @stubailo |
TODO:
Fixes #147