Hello, I'm trying to make sense out of this architecture. Currently I have one connector per model, which I now realize that that's more like the repository pattern.
I've been reading How to structure GraphQL server code where they seem to prefer caching and batching in the connector. Of course there they don't mention managers sooo...
The way this project is set up I believe a better place would be in the managers. Is this correct?
That would mean there is some place where to instantiate managers per request since you don't want to share cache between requests. Then it makes sense to place all managers on the GraphQL context object instead of as properties of the models.
I'm so confused, currently trying to simplify your implementation to be easier to read while keeping most of the benefits.
Hello, I'm trying to make sense out of this architecture. Currently I have one connector per model, which I now realize that that's more like the repository pattern.
I've been reading How to structure GraphQL server code where they seem to prefer caching and batching in the connector. Of course there they don't mention managers sooo...
The way this project is set up I believe a better place would be in the managers. Is this correct?
That would mean there is some place where to instantiate managers per request since you don't want to share cache between requests. Then it makes sense to place all managers on the GraphQL context object instead of as properties of the models.
I'm so confused, currently trying to simplify your implementation to be easier to read while keeping most of the benefits.