Skip to content

Instantly share code, notes, and snippets.

@fwojciec
Created January 20, 2020 16:15
Show Gist options
  • Save fwojciec/7faf317e8dc8a7232939a260d60901b7 to your computer and use it in GitHub Desktop.
Save fwojciec/7faf317e8dc8a7232939a260d60901b7 to your computer and use it in GitHub Desktop.
gqlserver2: dataloaders14
// group
groupByAuthorID := make(map[int64]*pg.Agent, len(authorIDs))
for _, r := range res {
groupByAuthorID[r.AuthorID] = &pg.Agent{
ID: r.ID,
Name: r.Name,
Email: r.Email,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment