-
Notifications
You must be signed in to change notification settings - Fork 0
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
Apollo #13
Apollo #13
Conversation
Redux integration (next step to wire Search box to Redux state => update query).
Client logging of request/response using network interface middleware.
Filter by current folder.
Manual refetch of queries.
// Called after optimisticResponse and once mutation has been returned from server. | ||
// https://github.com/apollostack/apollo-client/issues/621 | ||
// http://dev.apollodata.com/react/cache-updates.html#updateQueries | ||
updateQueries: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutations can provide optimistic results and affect the current query.
Here, I'm using the server side Item Matcher to filter the currently cached results against the mutated item.
This doesn't affect other cached query results (i.e., result sets for this same component with different filter variables).
Which is currently under discussion... (as of October)
apollographql/apollo-client#621
Using npm-workspace and webpack-link to configure sub node modules (e.g., import { TypeUtil } from 'minder-core'); Starting to factor out core client/server code to sub/core Start to move graphql (and server) to sub/graphql (under webpack) Clean-up of UX/rendering/logging.
Finally read this, thanks for the notes here. On Fri, Nov 11, 2016 at 7:51 PM, Rich Burdon [email protected]
|
This is awesome. I'm psyched you're happy about Apollo and it looks like On Wed, Nov 16, 2016 at 7:23 PM, Rich Burdon [email protected]
|
Hopefully you're not reading this kind of thing at the moment. Not least of the reasons being that I have to admit your curiosity about Apollo was well founded. It is so much simpler and straight-forward than Relay.
Although again I had to reverse engineer it to understand it properly (although the docs are much better):
https://github.com/alienlaboratories/react-demos/blob/051801ba75e9c79c5320f2e807edddd0b5566e75/docs/kbase/apollo.png
I have most of the technical functionality of the relay demo (and more) now working (queries with fragments, mutations, paging, network interface, etc.) The killer feature is of course Redux; I had talked myself out of needing it (Relays docs imply it's obsolete and it's quite complicated), but I think essential.
I found a few bugs too, but got quick responses from the team.
I'll write up a summary (currently https://github.com/alienlaboratories/react-demos/blob/051801ba75e9c79c5320f2e807edddd0b5566e75/sub/apollo/js/client/main.js).
On a meta level:
a) I think my desire to get something working really exacerbates the cognitive load of really absorbing these frameworks (GraphQL, then Relay, then Native and now Redux and Apollo).
b) I discounted Apollo having the potential resources/support of Relay. Yet Relay 2 doesn't inspire much confidence.
BTW, on the side, I completed the stories (team roster and delete); but the inscrutable nature of Relay's caching system (and abundant problems given mutations) made me want to explore Apollo thoroughly. I think I can probably port the entire current app from Relay in a 5-story (2 days) so am inclined to do that -- esp. since in some respects (caching, queries) I'm further ahead in Apollo at this point.
RB