Skip to content

Instantly share code, notes, and snippets.

@fwojciec
Created January 20, 2020 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fwojciec/5166a3ae41996b05fa9b99435565a7dd to your computer and use it in GitHub Desktop.
Save fwojciec/5166a3ae41996b05fa9b99435565a7dd to your computer and use it in GitHub Desktop.
func (r *bookResolver) Authors(ctx context.Context, obj *pg.Book) ([]pg.Author, error) {
return r.DataLoaders.Retrieve(ctx).AuthorsByBookID.Load(obj.ID)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment