Skip to content

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