graphql icon indicating copy to clipboard operation
graphql copied to clipboard

tests: query for nested interface

Open BarryThePenguin opened this issue 2 years ago • 3 comments

I added a field and query to the tests that reproduces the issue I've been facing

I fixed my original issue by adding a isList argument to resolveInterface(), similar to resolveUnion(). This allows resolveInterface() to resolve a field that is a list with resolveList().

Fixes #55

BarryThePenguin avatar May 30 '22 07:05 BarryThePenguin

@BarryThePenguin, thanks for opening this PR! Is the intention to add a failing test or is it to fully fix the issue you reported? Thanks!

jneurock avatar Jun 07 '22 21:06 jneurock

It was a failing test originally, just the schema changes alone were enough to reproduce the issue.

I ended up fixing my original issue by using resolveList() in my custom field resolver, so I had a go at including that in resolveInterface() to see if that would fix the tests.

I'll have a go at separating the two commits 👀

BarryThePenguin avatar Jun 07 '22 21:06 BarryThePenguin

Cool. Don't feel you have to separate the commits into separate PRs, if that's what you meant. Feel free to update the PR title and description to match the changes and mention that it fixes your issue # and all should be good. Thanks!

jneurock avatar Jun 07 '22 21:06 jneurock