Skip to content

Commit

Permalink
fix(discriminator): resolved issue with Model type (#367)
Browse files Browse the repository at this point in the history
Stopped document interface from extending mongoose Document
  • Loading branch information
Oluwatemilorun authored Aug 22, 2021
1 parent 8bb278e commit c7ee449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/composeWithMongooseDiscriminators.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { schemaComposer as globalSchemaComposer } from 'graphql-compose';
import type { Model, Document } from 'mongoose';
import type { Model } from 'mongoose';
import { ComposeWithMongooseDiscriminatorsOpts, DiscriminatorTypeComposer } from './discriminators';

export * from './discriminators';

export function composeWithMongooseDiscriminators<TDoc extends Document, TContext = any>(
export function composeWithMongooseDiscriminators<TDoc, TContext = any>(
baseModel: Model<TDoc>,
opts?: ComposeWithMongooseDiscriminatorsOpts<TContext>
): DiscriminatorTypeComposer<TDoc, TContext> {
Expand Down

0 comments on commit c7ee449

Please sign in to comment.