Skip to content

Commit bc16b9a

Browse files
committed
README.md
1 parent 6b76253 commit bc16b9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
graphql-compose-mongoose
22
======================
3-
This is a plugin for [graphql-compose](https://github.com/nodkz/graphql-compose), which derives GraphQLType from your [mongoose model](https://github.com/Automattic/mongoose). Also derives bunch of internal GraphQL Types. Provide all CRUD resolvers, including `graphql connection`.
3+
This is a plugin for [graphql-compose](https://github.com/nodkz/graphql-compose), which derives GraphQLType from your [mongoose model](https://github.com/Automattic/mongoose). Also derives bunch of internal GraphQL Types. Provide all CRUD resolvers, including `graphql connection`, also provided basic search via operators ($lt, $gt and so on).
44

55
Installation
66
============
@@ -53,7 +53,7 @@ const UserModel = mongoose.model('UserModel', UserSchema);
5353

5454

5555
// STEP 2: CONVERT MONGOOSE MODEL TO GraphQL PIECES
56-
const customizationOptions = {}; // left it empty for simplicity
56+
const customizationOptions = {}; // left it empty for simplicity, described below
5757
const typeComposer = composeWithMongoose(UserModel, customizationOptions);
5858
// get list of 12 Resolvers (findById, updateMany and others)
5959
const resolvers = typeComposer.getResolvers();
@@ -95,12 +95,12 @@ export default graphqlSchema;
9595
```
9696
That's all!
9797
You think that is to much code?
98-
I don't think so, because by default internally was created about 30 graphql types (for input, sorting, filtering). So you will need much much more lines of code to implement all these CRUD operations by hands.
98+
I don't think so, because by default internally was created about 55 graphql types (for input, sorting, filtering). So you will need much much more lines of code to implement all these CRUD operations by hands.
9999

100100

101101
Customization options
102102
=====================
103-
When we convert model `const typeComposer = mongooseToTypeComposer(UserModel, customizationOptions);` you may tune every piece of future derived types and resolvers.
103+
When we convert model `const typeComposer = composeWithMongoose(UserModel, customizationOptions);` you may tune every piece of future derived types and resolvers.
104104

105105
### Here is flow typed definition of this options:
106106

0 commit comments

Comments
 (0)