Querying an association that consists of an inheritance hierarchy fails due to Hibernate Proxies
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
This easily happens when the inheritance hierarchy in question is an association on a parent domain model that is being queried. If the object is not already in Hibernates cache, it generates a proxy for it when being retrieved, but then GraphQL is unable to adequately determine its type when fulfilling the query.
Adding this mostly as a placeholder/reminder to submit a PR that clarifies this gotcha in the docs.
Contributor guide
Research direction
Start with the issue description and the existing Grails documentation covering GraphQL, associations, inheritance hierarchies, and Hibernate proxies. Clarify the reported gotcha about querying an uncached associated object and GraphQL type resolution; done means the documentation explains the failure scenario and its relevant context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, groovy
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100