GraphQL #58
-
What would have to change if you'd swap REST for GraphQL ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@hinogi Anyway, i think i will create an example of this scenario in the repo source code. |
Beta Was this translation helpful? Give feedback.
@hinogi
The main advantage of this design is that we can abstract on cqrs query implementation.
This type of change will affect just the transport layer: the query handlers and command handlers remain unchanged since they operate independently of the transport layer and the domain logic, services, and repositories remain untouched because the API layer is only responsible for exposing data.
So, technically, we just need to change the REST controller with the GraphQL Resolver.
Anyway, i think i will create an example of this scenario in the repo source code.