Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created September 12, 2021 06:44
Show Gist options
  • Save percybolmer/8ea7bcd07b41e0ea92a799c255ee52b4 to your computer and use it in GitHub Desktop.
Save percybolmer/8ea7bcd07b41e0ea92a799c255ee52b4 to your computer and use it in GitHub Desktop.
graphql
// generateGraphQLField is a generic builder factory to create graphql fields
func generateGraphQLField(output graphql.Output, resolver graphql.FieldResolveFn, description string, args graphql.FieldConfigArgument) *graphql.Field {
return &graphql.Field{
Type: output,
Resolve: resolver,
Description: description,
Args: args,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment