Created
September 12, 2021 06:54
-
-
Save percybolmer/ad3e47506918eebfa95fd988e13ec9c8 to your computer and use it in GitHub Desktop.
graphql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generateRootMutation will create the root mutation object | |
func generateRootMutation(gs *gopher.GopherService) *graphql.Object { | |
mutationFields := graphql.Fields{ | |
// Create a mutation named modifyJob which accepts a JobType | |
"modifyJob": generateGraphQLField(jobType, gs.MutateJobs, "Modify a job for a gopher", modifyJobArgs), | |
} | |
mutationConfig := graphql.ObjectConfig{Name: "RootMutation", Fields: mutationFields} | |
return graphql.NewObject(mutationConfig) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment