[#1522] Unable to make a paginated query (GraphQl) for an entity view with inheritance configured #1960
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adapted
ViewTypeObjectBuilder
to fetch discriminator column instead of selectingNULL
when inheritance andpublic <X> SubGraph<X> fetch(String path)
are in use.Related Issue
#1522
Motivation and Context
I encountered a similar issue at my company, though it wasn’t directly related to GraphQL. The problem occurred with certain
public <X> SubGraph<X> fetch(String path)
calls ofEntityViewSetting<T, Q extends FullQueryBuilder<T, Q>>
for inheritance queries. From what I understand of the codebase, this mechanism is also involved in the GraphQL query flow.Because I approached the issue from a slightly different angle, I’m not entirely certain this fix resolves every aspect of the GraphQL case, but based on my tests, I believe it should help.
This is my first time contributing to Blaze-Persistence, so I’m not entirely sure if I’ve done everything correctly. I’d really appreciate any guidance or feedback to help me improve this PR. Specifically:
I’m eager to learn and happy to make any changes needed. Thank you so much for taking the time to review this! 😊