Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #242 tried to improve efficiency of resolution by using Gatbsy's built-in
@link
directives rather than custom resolvers for all references. However it caused a regression (#245) in cases where there is a list type with a union that contains a mix of references and inline nodes. This isn't a pattern that can be represented in Gatsby by default, so the@link
directive failed. Alongside this, lists of references don't have the@reference
directive added in the Sanity schema, so there is no way to determine if they are inline or references. This meant we can't reliably add@link
directives for these.For thios reason, this PR adds back custom resolvers for lists.
I have tested this locally with many sorts of lists and it works well, but I would like to work out a way to add better tests to handle this.
Fixes #245