Skip to content

Commit 2ac1277

Browse files
authored
Merge pull request #2 from devileye98/update-package-name
removes old readme, updates package name and version
2 parents cbdfbbb + c9a269c commit 2ac1277

File tree

5 files changed

+18
-316
lines changed

5 files changed

+18
-316
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
[![npm version](https://badge.fury.io/js/apollo-datasource-mongodb.svg)](https://www.npmjs.com/package/apollo-datasource-mongodb)
1+
# Fork from [apollo-datasource-mongodb][1]
22

3-
Apollo [data source](https://www.apollographql.com/docs/apollo-server/data/fetching-data) for MongoDB
3+
This package is based on the PR created by @nnoce14 in GitHub
4+
5+
Apollo [data source](https://www.apollographql.com/docs/apollo-server/data/fetching-data) for MongoDB
46

5-
Note: This README applies to the current version 0.6.0 and is meant to be paired with Apollo Server 4.
6-
See the old [README](README.old.md) for versions 0.5.4 and below, if you are using Apollo Server 3.
77

88
**Installation**
99
```
10-
npm i apollo-datasource-mongodb
10+
npm i apollov4-datasource-mongodb
1111
```
1212

1313
This package uses [DataLoader](https://github.com/graphql/dataloader) for batching and per-request memoization caching. It also optionally (if you provide a `ttl`) does shared application-level caching (using either the default Apollo `InMemoryLRUCache` or the [cache you provide to ApolloServer()](https://www.apollographql.com/docs/apollo-server/performance/cache-backends#configuring-external-caching)). It does this for the following methods:
@@ -44,7 +44,7 @@ The basic setup is subclassing `MongoDataSource`, passing your collection or Mon
4444
`data-sources/Users.js`
4545

4646
```js
47-
import { MongoDataSource } from 'apollo-datasource-mongodb'
47+
import { MongoDataSource } from 'apollov4-datasource-mongodb'
4848

4949
export default class Users extends MongoDataSource {
5050
getUser(userId) {
@@ -250,7 +250,7 @@ Since we are using a typed language, we want the provided methods to be correctl
250250
`data-sources/Users.ts`
251251

252252
```ts
253-
import { MongoDataSource } from 'apollo-datasource-mongodb'
253+
import { MongoDataSource } from 'apollov4-datasource-mongodb'
254254
import { ObjectId } from 'mongodb'
255255

256256
interface UserDocument {
@@ -315,7 +315,7 @@ to your data source class and modifying to options argument of the constructor t
315315
assign the context to the member field on your data source class. Note: context needs to be a class in order to do this.
316316

317317
```ts
318-
import { MongoDataSource } from 'apollo-datasource-mongodb'
318+
import { MongoDataSource } from 'apollov4-datasource-mongodb'
319319
import { ObjectId } from 'mongodb'
320320

321321
interface UserDocument {

README.old.md

Lines changed: 0 additions & 298 deletions
This file was deleted.

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module 'apollo-datasource-mongodb' {
1+
declare module 'apollov4-datasource-mongodb' {
22
import { KeyValueCache } from '@apollo/utils.keyvaluecache'
33
import { Collection as MongoCollection, ObjectId } from 'mongodb'
44
import {

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "apollo-datasource-mongodb",
3-
"version": "0.6.0",
2+
"name": "apollov4-datasource-mongodb",
3+
"version": "0.1.0",
44
"description": "Apollo data source for MongoDB",
55
"main": "dist/index.js",
66
"types": "index.d.ts",
@@ -34,14 +34,14 @@
3434
"release": "^6.3.0",
3535
"waait": "^1.0.5"
3636
},
37-
"homepage": "https://github.com/GraphQLGuide/apollo-datasource-mongodb",
37+
"homepage": "https://github.com/devileye98/apollov4-datasource-mongodb",
3838
"repository": {
3939
"type": "git",
40-
"url": "git+https://github.com/GraphQLGuide/apollo-datasource-mongodb"
40+
"url": "git+https://github.com/devileye98/apollov4-datasource-mongodb"
4141
},
4242
"license": "MIT",
4343
"bugs": {
44-
"url": "https://github.com/GraphQLGuide/apollo-datasource-mongodb/issues"
44+
"url": "https://github.com/devileye98/apollov4-datasource-mongodb/issues"
4545
},
4646
"author": "Loren Sands-Ramshaw <[email protected]> (https://graphql.guide)",
4747
"keywords": [

0 commit comments

Comments
 (0)