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

Resolve issue where an Entity is required in subgraphs and remove non-resolvable from _entity output #7165

Merged

Conversation

danielreynolds1
Copy link
Contributor

In HotChocolate 13.9+, entities are required to be present in a subgraph, but as per the attached issue, this isn't required to be the case. I also had a review of non-resolvable key behaviours.

Summary of the changes:

Subgraphs will now compile and run even if they don't contain any entities.
@key(resolvable: false) will no longer add the entity to the _entities union (see here).
Tests have been amended for these.

Closes #6900


public class TestTypePropertyDirectives
{
[Key(null!, resolvable: false)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a desirable syntax? Should resolvable be unsupported when specified on a field set?

A question for maintainers/Apollo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @michaelstaib, if you could have a small think about this comment, it would be appreciated. Once decision has been made/changes implemented, the rest can be reviewed a bit later. Thanks!

@danielreynolds1 danielreynolds1 marked this pull request as ready for review June 12, 2024 20:26
@michaelstaib
Copy link
Member

I will have a look today ... sorry for the wait

@michaelstaib michaelstaib merged commit 99c61fe into ChilliCream:main Jun 27, 2024
57 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(federation): ApolloFederation does not require any entities to be present
2 participants