AioInject errors while overriding resolve_connection method (relay)
I wanted to create my own relay connection class like so:
I get this mypy error which shows an error in the method signature:
How could this be fixed? I need to get my session within the resolver
3 Replies
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
I'm revamping the way I'm using connections, actually.
So I'm having a repo layer as well as a service layer behind the resolver layer.
The repo layer handles the pagination and returns a data class called PaginatedResult.
My resolver inturn converts it into a connection by just type casting the right fields.
I think this approach is more scalable and aligns with separation of concerns principles better
So IMO this connection abstraction via the decorator doesn't really scale.
Or atleast it should allow the field to return any object (like the PaginatedResult object I mentioned above), rather than just a list of nodes
What do you think??
Should I propose a new feature about this?🤔🤔