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

Mock resolvers ignore abstract types #427

Open
ling1726 opened this issue Aug 8, 2024 · 1 comment
Open

Mock resolvers ignore abstract types #427

ling1726 opened this issue Aug 8, 2024 · 1 comment

Comments

@ling1726
Copy link
Member

ling1726 commented Aug 8, 2024

Repro with instructions and comparison with the relay mock payload generator: https://github.com/ling1726/graphitation-payload-generator-repro

When abstract types are used with the payload generator for @graphitation/graphql-js-operation-payload-generator - they are ignored in favour of concrete types. This makes it hard to create mocks for queries that involve abstract interfaces and polymorphism

@alloy
Copy link
Member

alloy commented Aug 8, 2024

To elaborate, the issue is that when we have mocks for interfaces, but the executor is following schema that is referring to concrete types, those interface mocks never get used. For each concrete type, we should check if there are mocks for any of the interfaces that the type implements.

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

No branches or pull requests

2 participants