I’m having trouble seeing how to integrate Apollo ...
# prisma-whats-new
j
I’m having trouble seeing how to integrate Apollo with a side-effect lib like redux-saga or redux-observable. Here’s a simple example: Say I had a modal with a form. When the user clicks the “Save” button, I want 1) the Apollo mutation to run, 2) I want a close window action to fire, 3) I want another action to fire that will pop the snackbar saying “Form saved”. All I get from apollo is the “mutate” prop. How can I use that to play nice with the rest of the redux ecosystem?
n
@jcheroske have you http://dev.apollodata.com/react/redux.html already? should give you some ideas
j
Yes, I’ve done that. That’s not what I’m asking about. I’m frustrated with the Apollo mindset. It purports to be redux-friendly, but then seems to force you to use the HOC and doesn’t give you any way to drive it using action creators. The redux world is all about side effect libs, and that’s where I want to capture my complex behaviors. Sandwiching the Apollo HOC between redux
connect
HOCs in order to get the same behavior seems like a hack.