3 ms·
The parent claimed that GraphQL has different DTOs for reads and writes. That could make it CQRS compatible, couldn't it? I don't know if it would be any more
by simiones 6y ago
The parent claimed that GraphQL has different DTOs for reads and writes. That could make it CQRS compatible, couldn't it?
I don't know if it would be any more idiomatic for GraphQL than it would be for REST.
- morelisp 6y agoYou could argue that a REST DTO for reads is a query string and a REST DTO for writes is a JSON body. That seems comparable to the GraphQL case to me. In the end it's about whether the term tells you something about the architecture, and in neither of those cases would I gain useful knowledge of the system from someone saying "it's CQRS." A better litmus test is probably something to do with enumerating possible commands. So a GraphQL API with a specific set of mutations could be a CQRS design. But if your mutations are just CRUD spelled differently, it's probably not.