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

HotChocolate Fusion Composer ignores private directive #7796

Closed
aidy-jenkins opened this issue Dec 2, 2024 · 2 comments
Closed

HotChocolate Fusion Composer ignores private directive #7796

aidy-jenkins opened this issue Dec 2, 2024 · 2 comments

Comments

@aidy-jenkins
Copy link
Contributor

Product

Hot Chocolate

Version

14.1

Link to minimal reproduction

https://github.com/aidy-jenkins/FusionIssueReproduction/tree/private-directive

Steps to reproduce

Add the line extend type Query @private into a schema extension file when defining a subgraph.

Pack and compose a gateway as normal and run it.

Check the resulting Gateway schema

What is expected?

The @private directive should be hiding all the types from the Query as per this blog post:

https://chillicream.com/blog/2023/08/15/graphql-fusion

What is actually happening?

When composing the schema there are no errors but the @private directive is completely ignored.
In the linked example, you can see that the resolvers for bar and barsByFoo should be private but instead they are still visible on the Gateway

Image

Relevant log output

Additional context

No response

@michaelstaib
Copy link
Member

The private directive existed in the initial proto types ... we have now standardized it to @internal.

Checkout the docs: https://chillicream.com/docs/fusion/v14

@aidy-jenkins
Copy link
Contributor Author

Hey @michaelstaib, thanks for the link, the docs did not exist when I started looking at this 🙃 but useful to know.

I have read the docs, but the only mention I can find of the @internal directive is with respect to lookups.
Is there a way to prevent the gateway from exposing all of the subgraph query by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants