fix(models): make user.teams work with eager
When running the user query, teams are not populated, but are instead null
.
This is because the resolver uses fetchOne
, which seems to ignore the options
object which includes eager
.
This fixes the above by using find
instead.
I also made a change in the gql schema to allow teams to return without members.
When getting user.teams
, you don't need the members.