Skip to content
Discussion options

You must be logged in to vote

I figured out how to do what I wanted

private loadDefaultRelations(query: any, relations: any) {
  for (const relation in relations) {
    if (Object.values(relations[relation])[0]) {
      query.preload(relation, (newQuery: any) => this.loadDefaultRelations(newQuery, relations[relation]))
    } else {
      query.preload(relation)
    }
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arnauddoub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant