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

fix: inherit Query type from schema superclass #241

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

jturkel
Copy link
Contributor

@jturkel jturkel commented Apr 14, 2023

This PR fixes ApolloFederation::Schema to properly inherit the Query type from any superclasses so code like the following works as expected:

class BaseSchema < GraphQL::Schema
  include ApolloFederation::Schema
  query QueryType
end

class MySchema < BaseSchema
  # ...
end

We use this subclassing pattern quite a bit in tests to avoid mutating our "real" schema class.

@grxy grxy changed the title fix: Inherit Query type from schema superclass fix: inherit Query type from schema superclass Apr 19, 2023
@grxy grxy merged commit 0efb37e into Gusto:main Apr 19, 2023
grxy pushed a commit that referenced this pull request Apr 19, 2023
## [3.6.4](v3.6.3...v3.6.4) (2023-04-19)

### Bug Fixes

* inherit Query type from schema superclass ([#241](#241)) ([0efb37e](0efb37e))
@grxy
Copy link
Collaborator

grxy commented Apr 19, 2023

🎉 This PR is included in version 3.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@grxy grxy added the released label Apr 19, 2023
Kaytal pushed a commit to lensrentals/apollo-federation-ruby that referenced this pull request Oct 1, 2024
Kaytal pushed a commit to lensrentals/apollo-federation-ruby that referenced this pull request Oct 1, 2024
## [3.6.4](Gusto/apollo-federation-ruby@v3.6.3...v3.6.4) (2023-04-19)

### Bug Fixes

* inherit Query type from schema superclass ([Gusto#241](Gusto#241)) ([0efb37e](Gusto@0efb37e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants