Skip to content

Commit edb7b4c

Browse files
authored
feat(upgrade): update (#644)
1 parent c4ac6ef commit edb7b4c

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# GraphQL Mongoose Loader [![CircleCI](https://circleci.com/gh/entria/graphql-mongoose-loader/tree/master.svg?style=svg)](https://circleci.com/gh/entria/graphql-mongoose-loader/tree/master)
1+
# GraphQL Mongoose Loader
22

33
## Install
44
```
5-
npm i @entria/graphql-mongoose-loader --save
6-
yarn add @entria/graphql-mongoose-loader
5+
npm i @woovi/graphql-mongoose-loader --save
6+
yarn add @woovi/graphql-mongoose-loader
77
```
88

99
## Mongoose Dataloader Batch
@@ -40,7 +40,7 @@ export default mongoose.model('User', Schema);
4040
Create a Dataloader for it
4141

4242
```jsx
43-
import { mongooseLoader } from '@entria/graphql-mongoose-loader';
43+
import { mongooseLoader } from '@woovi/graphql-mongoose-loader';
4444
import UserModel from './User';
4545

4646
export const getLoader = () => new DataLoader(ids => mongooseLoader(UserModel, ids));
@@ -51,7 +51,7 @@ export const getLoader = () => new DataLoader(ids => mongooseLoader(UserModel, i
5151
Create a connection from mongoose cursor
5252

5353
```jsx
54-
import { connectionFromMongoCursor } from '@entria/graphql-mongoose-loader';
54+
import { connectionFromMongoCursor } from '@woovi/graphql-mongoose-loader';
5555

5656
export const loadUsers = async (context: GraphQLContext, args: ConnectionArguments) => {
5757
const where = args.search
@@ -79,7 +79,7 @@ export const loadUsers = async (context: GraphQLContext, args: ConnectionArgumen
7979
Create a connection from mongoose aggregate
8080

8181
```jsx
82-
import { connectionFromMongoAggregate } from '@entria/graphql-mongoose-loader';
82+
import { connectionFromMongoAggregate } from '@woovi/graphql-mongoose-loader';
8383

8484
export const loadUsersThatHaveGroup = async (context: GraphQLContext, args: ConnectionArguments) => {
8585
const aggregate = GroupModel.aggregate([

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
"email": "[email protected]",
88
"url": "https://github.com/woovi"
99
},
10+
"dependencies": {
11+
"mongodb-memory-server-global": "^10.1.4",
12+
"uuid": "^11.1.0"
13+
},
1014
"devDependencies": {
1115
"@commitlint/cli": "19.8.1",
1216
"@commitlint/config-conventional": "19.8.1",
@@ -22,6 +26,16 @@
2226
"typescript": "5.8.3",
2327
"vitest": "^3.2.4"
2428
},
29+
"exports": {
30+
".": {
31+
"types": "./dist/index.d.ts",
32+
"import": "./dist/index.js",
33+
"require": "./dist/index.cjs"
34+
}
35+
},
36+
"files": [
37+
"dist"
38+
],
2539
"homepage": "https://github.com/woovibr/graphql-mongoose-loader",
2640
"keywords": [
2741
"graphql",
@@ -38,6 +52,7 @@
3852
"prettier --write"
3953
]
4054
},
55+
"main": "./dist/index.cjs",
4156
"peerDependencies": {
4257
"graphql": "*",
4358
"graphql-relay": "*",
@@ -51,20 +66,9 @@
5166
"type": "git",
5267
"url": "git+https://github.com/woovibr/graphql-mongoose-loader"
5368
},
54-
"type": "module",
55-
"exports": {
56-
".": {
57-
"types": "./dist/index.d.ts",
58-
"import": "./dist/index.js",
59-
"require": "./dist/index.cjs"
60-
}
61-
},
62-
"main": "./dist/index.cjs",
63-
"types": "./dist/index.d.ts",
64-
"files": [
65-
"dist"
66-
],
6769
"scripts": {
70+
"build": "rslib build",
71+
"dev": "rslib build --watch",
6872
"lint": "eslint src/**",
6973
"lint:staged": "lint-staged",
7074
"precommit": "yarn lint:staged",
@@ -73,12 +77,8 @@
7377
"release:major": "npm version major && git push --follow-tags",
7478
"release:minor": "npm version minor && git push --follow-tags",
7579
"release:patch": "npm version patch && git push --follow-tags",
76-
"test": "vitest",
77-
"build": "rslib build",
78-
"dev": "rslib build --watch"
80+
"test": "vitest"
7981
},
80-
"dependencies": {
81-
"mongodb-memory-server-global": "^10.1.4",
82-
"uuid": "^11.1.0"
83-
}
82+
"type": "module",
83+
"types": "./dist/index.d.ts"
8484
}

0 commit comments

Comments
 (0)