Skip to content

Commit

Permalink
Merge branch 'master' into feature/interface-loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide-Gheri committed Feb 22, 2021
2 parents 1f3b6c4 + 79529a4 commit ea2f035
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 120 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
Expand Down
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
"eslint": "^7.20.0",
"eslint-config-prettier": "^7.2.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-import": "^2.22.1",
"fastify": "^3.12.0",
"graphql": "^15.5.0",
Expand All @@ -49,13 +49,13 @@
"graphql-tag": "^2.11.0",
"husky": "5",
"lint-staged": "^10.5.4",
"mercurius": "^7.0.0",
"mercurius": "^7.1.0",
"mercurius-integration-testing": "^3.1.3",
"mercurius-upload": "^1.1.1",
"pinst": "^2.1.4",
"prettier": "^2.2.1",
"reflect-metadata": "^0.1.13",
"release-it": "^14.4.0",
"release-it": "^14.4.1",
"rxjs": "^6.6.3",
"supertest": "^6.1.3",
"ts-node": "^9.1.1",
Expand All @@ -73,7 +73,7 @@
"altair-fastify-plugin": "^3.2.1",
"fastify": "^3.12.0",
"graphql": "^15.5.0",
"mercurius": "^7.0.0",
"mercurius": "^7.1.0",
"mercurius-upload": "^1.1.1",
"reflect-metadata": "^0.1.13"
},
Expand Down
Loading

0 comments on commit ea2f035

Please sign in to comment.