Skip to content

feat(upgrade): update #644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 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)
# GraphQL Mongoose Loader

## Install
```
npm i @entria/graphql-mongoose-loader --save
yarn add @entria/graphql-mongoose-loader
npm i @woovi/graphql-mongoose-loader --save
yarn add @woovi/graphql-mongoose-loader
```

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

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

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

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

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

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

export const loadUsersThatHaveGroup = async (context: GraphQLContext, args: ConnectionArguments) => {
const aggregate = GroupModel.aggregate([
Expand Down
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"email": "dev@woovi.com.br",
"url": "https://github.com/woovi"
},
"dependencies": {
"mongodb-memory-server-global": "^10.1.4",
"uuid": "^11.1.0"
},
"devDependencies": {
"@commitlint/cli": "19.8.1",
"@commitlint/config-conventional": "19.8.1",
Expand All @@ -22,6 +26,16 @@
"typescript": "5.8.3",
"vitest": "^3.2.4"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"files": [
"dist"
],
"homepage": "https://github.com/woovibr/graphql-mongoose-loader",
"keywords": [
"graphql",
Expand All @@ -38,6 +52,7 @@
"prettier --write"
]
},
"main": "./dist/index.cjs",
"peerDependencies": {
"graphql": "*",
"graphql-relay": "*",
Expand All @@ -51,20 +66,9 @@
"type": "git",
"url": "git+https://github.com/woovibr/graphql-mongoose-loader"
},
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "rslib build",
"dev": "rslib build --watch",
"lint": "eslint src/**",
"lint:staged": "lint-staged",
"precommit": "yarn lint:staged",
Expand All @@ -73,12 +77,8 @@
"release:major": "npm version major && git push --follow-tags",
"release:minor": "npm version minor && git push --follow-tags",
"release:patch": "npm version patch && git push --follow-tags",
"test": "vitest",
"build": "rslib build",
"dev": "rslib build --watch"
"test": "vitest"
},
"dependencies": {
"mongodb-memory-server-global": "^10.1.4",
"uuid": "^11.1.0"
}
"type": "module",
"types": "./dist/index.d.ts"
}
Loading