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(types): resolve arrays correctly with multi-property resolver #295

Merged
merged 2 commits into from
Oct 7, 2022

Conversation

LiamMartens
Copy link
Collaborator

This sort of resolves #102 - the GROQ was already generated correctly, but the multi property resolver typing wasn't accounting for array types. Added a test and type logic for this to work:

const [query] = movie
  .map(h => ({ cast: h.castMembers.resolveIn(['name', 'otherfield']).use() }))
  .pick(['title', 'cast'])
  .use()

@danielroe danielroe changed the title fix: Array resolve in typing fix(types): resolve arrays correctly with multi-property resolver Oct 7, 2022
@danielroe danielroe merged commit a422167 into main Oct 7, 2022
@danielroe danielroe deleted the fix/array-resolve-in-typing branch October 7, 2022 11:04
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.

docs: Resolve property from array of references.
2 participants