You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it might be slightly different. We are experiencing this issue with union types. I have downloaded the reproduction case of 4318 and upgraded it to the latest HotChocolate version 15.1.3. And that one worked ok.
Next I have updated it to use union types. And I have simplified the example and the database models and used some models of the HotChocolate documentation. And I have added support for in memory database.
What is expected?
When I query not the complete set of union types but a subset then I expect only that subset to be returned. For example when my union type consists of 2 types and I specify only one then only that one should be returned.
Depending on the query and depending if I use the in memory database or a real database I get:
null as result or
Exception of EF Core:
The client projection contains a reference to a constant expression of 'Reproduction.ImageContent'. This could potentially cause a memory leak; consider assigning this constant to a local variable and using the variable in the query instead.
HaroldH76
changed the title
Regression bug: Unable to spread fragment on inheritance hierarchy added as a union or interface type when deferred to Entity Framework
Union types: EF Core exception: The client projection contains a reference to a constant expression...
Apr 24, 2025
Product
Hot Chocolate
Version
15.1.3
Link to minimal reproduction
https://github.com/HaroldH76/Hotchocolate-8252/
Steps to reproduce
The issue looks like the one of: #4318
But it might be slightly different. We are experiencing this issue with union types. I have downloaded the reproduction case of 4318 and upgraded it to the latest HotChocolate version 15.1.3. And that one worked ok.
Next I have updated it to use union types. And I have simplified the example and the database models and used some models of the HotChocolate documentation. And I have added support for in memory database.
What is expected?
When I query not the complete set of union types but a subset then I expect only that subset to be returned. For example when my union type consists of 2 types and I specify only one then only that one should be returned.
What is actually happening?
Depending on the query and depending if I use the in memory database or a real database I get:
Additional context
Se the readme of the reproduction case for more information and more example graphql queries:
https://github.com/HaroldH76/Hotchocolate-8252/
The text was updated successfully, but these errors were encountered: