Skip to content

Fixed unintended union distribution #55

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

Merged
merged 1 commit into from
Apr 12, 2021
Merged

Fixed unintended union distribution #55

merged 1 commit into from
Apr 12, 2021

Conversation

Idono87
Copy link
Contributor

@Idono87 Idono87 commented Apr 12, 2021

Fixed issue where a union of document models would be distributed as a union of collections instead of a collection with a union of document models. As a side effect, the old type did not allow multiple document types to be inserted, updated or retrieved.

Expected behavior should be as follows:

interface A { ... }
interface B { ... }
interface C { ... }

type ExpectedType = Collection<A | B | C>
// MongoCollection<A | B | C>

Old behavior causes the type to be distributed as:

interface A { ... }
interface B { ... }
interface C { ... }

type OldType = Collection<A | B | C>
// MongoCollection<A> | MongoCollection<B> | MongoCollection<C>

@lorensr lorensr merged commit cd22a34 into GraphQLGuide:master Apr 12, 2021
@lorensr
Copy link
Member

lorensr commented Apr 12, 2021

Thanks! Released in v0.3.2

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.

2 participants