-
-
Notifications
You must be signed in to change notification settings - Fork 777
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
Removing all mutations from subgraphs doesn't remove the Mutation type from the supergraph schema #7813
Comments
It would be nice to have something like the |
@scottstubbs this is coming with the March release. |
At the moment you can use the extend schema
@remove(coordinate: "Mutation")
{
} With the march release we will have |
Thank you for the guidance. After adding the |
I will have a look at it. |
Updated the repo to the latest version 15.1.3, and continue to see the error when Hot Chocolate tries to build the schema with an empty Mutation type. |
Product
Hot Chocolate
Version
14.2.0
Link to minimal reproduction
https://github.com/scottstubbs/HotChocolate-Fusion-Hide-Mutations
Steps to reproduce
To run the solution:
dotnet tool restore
HotChocolate-Fusion-Mutations.sln
https://localhost:50000/graphql
in a browserAt this point the introspection fails.
To make changes to the subgraphs, rebuild the gateway from the root directory:
./Fuse.ps1
to pack and compose all projects OR./Fuse.ps1 -Project {ProjectFolder}
to pack and compose a specific projectWhat is expected?
Introspection should succeed. The Mutation type should be gone from the supergraph schema.
What is actually happening?
Introspection fails and the error is logged to the Nitro console and the Visual Studio Output window.
Relevant log output
Additional context
This happens because all subgraph mutations were marked with the
[Internal]
attribute. Thefusion compose
command doesn't remove the emptyMutation
type from the supergraph schema. The same result happens when using the[Tag(name: "internal")]
attribute.The text was updated successfully, but these errors were encountered: