Sangria implementation pattern, on application with lot of modules

59 views
Skip to first unread message

Mandeep Shrestha

unread,
Nov 16, 2017, 3:29:02 AM11/16/17
to sangria-graphql

*note: If the post is not proper for the group please do tell, and will relocate it some where else. It felt like hijacking the gitter channel so, moved the conversation here.

Created this post as we were having discussion about efficient way of handling scenarios where there are a lot of modules to take care of.

-> Very simple yet inefficient way = Just create all the Object and Input types in a single class, with "Query" type defined in the file too.
-> Another idea, but can't be sure how it spans out later = MultipleInheritance, BaseRepo/BaseSchema extends all the other FooRepo, BarRepo ... (need to write FooRepo, ... as traits with implementations)

paulpdaniels , had provided with a very good advice of merging the schema and repo, using modular patterns, but I seem to be getting some issue in its implementation



Mandeep Shrestha

unread,
Nov 16, 2017, 7:57:04 AM11/16/17
to sangria-graphql
Update:

Ended up, creating a BaseSchema and BaseRepo for implementations; not much of a modular approach though.
Reply all
Reply to author
Forward
0 new messages