Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Last active September 9, 2021 12:28
Show Gist options
  • Save percybolmer/c7e9e39d73ce65a6f5d9f675c211177f to your computer and use it in GitHub Desktop.
Save percybolmer/c7e9e39d73ce65a6f5d9f675c211177f to your computer and use it in GitHub Desktop.
graphql
// generateJobsField will build the GraphQL Field for jobs
func generateJobsField(gs *gopher.GopherService) *graphql.Field {
return &graphql.Field{
// Return a list of Jobs
Type: graphql.NewList(jobType),
Description: "A list of all jobs the gopher had",
Resolve: gs.ResolveJobs,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment