Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide-Gheri committed Feb 22, 2021
1 parent 7e31570 commit 7b7083b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class Cat {
```typescript
import { Resolver, Query, ResolveField, Parent, Mutation, Subscription, Context, Args } from '@nestjs/graphql';
import { ParseIntPipe } from '@nestjs/common';
import { ResolveLoader, LoaderQueries, LoaderContext, toAsyncIterator, LoaderQuery } from 'nestjs-mercurius';
import { ResolveLoader, toAsyncIterator, LoaderQuery } from 'nestjs-mercurius';
import { PubSub } from 'mercurius';
import { groupBy } from 'lodash';
import { Cat } from './cat';
Expand Down Expand Up @@ -122,7 +122,7 @@ export class CatResolver {

@ResolveLoader(() => User, { opts: { cache: false } })
owner(
@LoaderQueries() queries: LoaderQuery<Cat>[],
@Parent() queries: LoaderQuery<Cat>[],
) {
return this.userService.findById(
// queries is an array of objects defined as { obj, params } where obj is the current object and params are the GraphQL params
Expand Down

0 comments on commit 7b7083b

Please sign in to comment.