mattkrick / cashay

:moneybag: Relay for the rest of us :moneybag:
MIT License
453 stars 28 forks source link

Query<->Mutation Chicken<->Egg problem #72

Closed mattkrick closed 8 years ago

mattkrick commented 8 years ago

A painful paradigm I'm coming across is how sometimes you need to call a mutation before you query that same data.

This is a problem because mutations need to return something (although that could change depending on the response for https://github.com/graphql/graphql-js/issues/410.

The options we have are:

@jordanh any other viable patterns you see?

mattkrick commented 8 years ago

For now, the cleanest pattern is to make the type a scalar, like Boolean. That way, we don't have to return anything. In doing so, we don't have to listen for that return prematurely. See createTeam in parabolinc/action