Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate resolvers for each operation #561

Merged
merged 1 commit into from
Feb 11, 2023
Merged

Conversation

pavelnikolov
Copy link
Member

@pavelnikolov pavelnikolov commented Feb 9, 2023

This PR allows having fields in the schema with the same name in different operations. For example, consider the schema below:

schema {
	query: Query
	mutation: Mutation
	subscription: Subscription
}

type Query {
	hello: String!
}

type Mutation {
	hello: String!
}

type Subscription {
	hello: HelloEvent!
}

type HelloEvent {
	msg: String!
}

Before this PR it was not possible to have more than one operation with the same field name. This PR resolves the problem in a backwards compatible way.
Continuation from #182
Fixes #145
Fixes #562

@nicksnyder

This comment was marked as resolved.

@pavelnikolov pavelnikolov merged commit a97aa14 into master Feb 11, 2023
@pavelnikolov pavelnikolov deleted the separate-resolvers branch February 11, 2023 11:46
@pavelnikolov pavelnikolov added this to the v1.6.0 milestone Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split resolvers for different operations Separate resolvers for queries and mutations
2 participants