3 ms·
Cries in GraphQL (where you generally POST, even for queries).
by kenrose 5y ago
Cries in GraphQL (where you generally POST, even for queries).
- simonw 5y agoGraphQL might work OK though, because it differentiates queries from mutations - so you could have some early logic that says "if this POST request includes a mutation, replay against the leader - otherwise keep running against the replica".
- mrkurt 5y agoIt's true! We designed this specifically because it works with GraphQL. The exception->replay works by default, and it's easy to send early replay command on GraphQL mutations.
- valzam 5y agoWhat is more you could just have your client send all mutations to one API and all queries to another. I suppose you could do that with REST as well by in Graphql the deliniation is very clear and there are only 2 cases you need to handle.
- kortex 5y agoA standard QUERY verb should fix this. https://www.w3.org/2012/ldp/wiki/Proposal_for_HTTP_QUERY_Verb https://www.w3.org/2012/ldp/wiki/Proposal_for_HTTP_QUERY_Ver...