MichalLytek / MichalLytek/type-graphql

Returning deeply extended type from inteface query

Open
#373 0 comments 0 reactions 1 assignee Claimed by @MichalLytek View on GitHub
Bug :bug:
Dominant language
TypeScript
Stars
8.1k
Forks
672
PR merge metrics
No merged PRs in 30d

Description

#279 added support for returning plain object from queries which returns type is an interface but it introduced a regression that makes `interfaces-inheritance` example not working correctly.

The `implementingObjectTypesTargets` looks for classes that implements selected interface but because of current pipeline limitation (#183) it doesn't have access to parent and its parent classes metadata, so when using deeply nested inheritance, it might return the first (base) class always.

The workaround for now is to use custom `resolveType` functions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.