if I have more than one mutation type, an error is thrown during generation
It would be nice if we could organize our mutations into separate types and file structure that gets listed under the yml file and then combined during generation. The problem is that in large apps where there are many mutations, the single mutation type gets out of hand and unmanageable very quickly.
Ideally something like
#projects.graphql
type mutation {
createProject
updateProject
deleteProject
}
#users.graphql
type mutation{
createUser
updateUser
deleteUser
}
or any variation of that.
gqlgen version? latestgo version? 1.12In your schema.graphql
type Query
type Mutation
In your users.graphql
extend type Query {
findById: User
}
As @bugzpodder points out, you can do this using type extension
Most helpful comment
In your schema.graphql
In your users.graphql