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 related record filtering/fix union resolution #20

Merged
merged 6 commits into from
Oct 2, 2020

Conversation

jneurock
Copy link
Collaborator

@jneurock jneurock commented Oct 1, 2020

This PR fixes somewhat related issues #18 and #19 where, respectively, union type resolution can fail when there's a parent object and filtering for related has-many records fails.

A function to filter related records was added and is now called when resolving list types and a list of union types.

Additionally, the type name parameter was removed from the functions that adapt records as this is essentially already present on the record from Mirage's database and doesn't need to be passed in.

Fixes #16.
Fixes #18.
Fixes #19.

lib/utils.js Show resolved Hide resolved
lib/resolvers/relay.js Outdated Show resolved Hide resolved
@jneurock jneurock merged commit 5d2e20b into main Oct 2, 2020
@jneurock jneurock deleted the fix-related-record-filtering/fix-union-resolution branch October 2, 2020 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant