If you go with option 1 then you just need to add composed type like TweetWithUser/etc and write operation resolvers that will parse different objects separately and create composed type. Example is here.
If you go with option 2 then it's pretty much the same approach of getting separate objects from Cursor as 1 but you'll need to pass custom RawQuery with JOIN to get both objects.
Personally, we've used second option in real apps with StorIO, works ok.
Just always keep in mind that StorIO is not ORM and you have full control over both queries and operations resolvers, also you can pass specific operation resolver per query.
Basically, you have 2 different approaches:
If you go with option 1 then you just need to add composed type like
TweetWithUser
/etc and write operation resolvers that will parse different objects separately and create composed type. Example is here.If you go with option 2 then it's pretty much the same approach of getting separate objects from
Cursor
as 1 but you'll need to pass customRawQuery
withJOIN
to get both objects.We have an example of that in the sample app in the repo, please check it!
Personally, we've used second option in real apps with StorIO, works ok.
Just always keep in mind that StorIO is not ORM and you have full control over both queries and operations resolvers, also you can pass specific operation resolver per query.