Skip to content
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

fix: correct runtime check for resolve strategies #987

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gzomer
Copy link

@gzomer gzomer commented Sep 8, 2021

The documentation states that when both centralized and modular strategies are enabled you have to either implement isTypeOf in all members or implement resolveType in the abstract type.

isTypeOf on all member types & resolveType on abstract type required until either all members have isTypeOf implemented or resolveType is implemented.

However, the current implementations is as follows:

if (
      (resolveTypeImplemented === false || typesWithoutIsTypeOf.length > 0) &&
      features.abstractTypeStrategies.isTypeOf === true &&
      features.abstractTypeStrategies.resolveType === true
    ) {

Instead, it should only trigger an error when both checks are false (no resolver implemented and there are missing types).

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

Successfully merging this pull request may close these issues.

4 participants