Skip to content

fix: register getter on runtime when field is of a parent type (#2091)#2093

Merged
samuelAndalon merged 1 commit into8.x.xfrom
fix/8.x.x/singleton-property-data-fetcher
Apr 23, 2025
Merged

fix: register getter on runtime when field is of a parent type (#2091)#2093
samuelAndalon merged 1 commit into8.x.xfrom
fix/8.x.x/singleton-property-data-fetcher

Conversation

@samuelAndalon
Copy link
Contributor

@samuelAndalon samuelAndalon commented Apr 23, 2025

📝 Description

Adding a missing use case when the registered resolver during schema generation is from a Parent class, while on runtime the resolve object could be an instance of a Child class, as a result, the resolver won't be available in the getters cache.

This PR will attempt to resolve the getter using reflection and it will store it in the getters cache, if not getter found after checking the cache and checking the object class with reflection then a message log will be printed

cherry pick #2091

### 📝 Description
Adding a missing use case when the registered resolver during schema
generation is from a Parent class, while on runtime the resolve object
could be an instance of a Child class, as a result, the resolver won't
be available in the getters cache.

This PR will attempt to resolve the getter using reflection and it will
store it in the getters cache, if not getter found after checking the
cache and checking the object class with reflection then a message log
will be printed

Co-authored-by: Samuel Vazquez <samvazquez@expediagroup.com>
@samuelAndalon samuelAndalon requested a review from Samjin April 23, 2025 19:30
@samuelAndalon samuelAndalon merged commit dbfc9dc into 8.x.x Apr 23, 2025
8 checks passed
@samuelAndalon samuelAndalon deleted the fix/8.x.x/singleton-property-data-fetcher branch April 23, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant