Skip to content

Instantly share code, notes, and snippets.

@karthikraobr
Last active May 5, 2019 15:09
Show Gist options
  • Save karthikraobr/d6d2dc3ee72f0f4c2da95b823007c200 to your computer and use it in GitHub Desktop.
Save karthikraobr/d6d2dc3ee72f0f4c2da95b823007c200 to your computer and use it in GitHub Desktop.
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Query")
case "account":
field := field
out.Concurrently(i, func() (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_account(ctx, field)
return res
})
case "accounts":
field := field
out.Concurrently(i, func() (res graphql.Marshaler) {
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
res = ec._Query_accounts(ctx, field)
return res
})....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment