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

Mutation response types are ignored since 3.8.5 #292

Open
severin opened this issue Feb 6, 2025 · 0 comments
Open

Mutation response types are ignored since 3.8.5 #292

severin opened this issue Feb 6, 2025 · 0 comments

Comments

@severin
Copy link

severin commented Feb 6, 2025

(This is maybe related to #272)

We use Federation and we have some mutations that contain an ErrorExtensions type in their results. This ErrorExtensions type is federated between multiple services.

When upgrading from 3.8.1 to 3.10.0 the ErrorExtensions type disappears from the _Entity union:

-union _Entity = ErrorExtensions | Other | Federated | Types
+union _Entity = Other | Federated | Types

The type is only "reachable" through mutations, so it's not really an orphan type.

Applying the hacky solution from #272 (adding an orphan_type declaration before query) seems to work around the issue though:

class OnRunningSchema < GraphQL::Schema
  include ApolloFederation::Schema
  federation version: '2.0'

  orphan_types [Types::ErrorExtensionsType]  

  query Types::QueryType

  # ...
end
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

No branches or pull requests

1 participant