Skip to content

Resolvers for sub fields #8263

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

Open
TylerSiegrist opened this issue Apr 25, 2025 · 0 comments
Open

Resolvers for sub fields #8263

TylerSiegrist opened this issue Apr 25, 2025 · 0 comments

Comments

@TylerSiegrist
Copy link
Contributor

Product

Hot Chocolate

Is your feature request related to a problem?

Resolvers are not run for properties of properties...

descriptor.Field(x => x.Foo.Bar).Resolve(ctx => "bar") // This is never run

I have a use case for it where I have several types implementing a shared interface. Depending on the implementation type, different downstream APIs should be called to fetch certain fields. I have created a minimal repository with a basic test to reproduce: https://github.com/TylerSiegrist/HotChocolate.Example.Resolver.Subfields

The solution you'd like

Resolvers are executed for properties of properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant