You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,7 @@
11
11
12
12
This is a plugin for [graphql-compose](https://github.com/graphql-compose/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).
-`UserTC` - this is a TypeComposer instance for User. TypeComposer has GraphQLObjectType inside, avaliable via method UserTC.getType().
49
-
- Here and in all other places of code suffix `...TC` means that this is TypeComposer instance, `...ITC` - InputTypeComposer, `...ETC` - EnumTypeComposer.
47
+
-`UserTC` - this is a `TypeComposer` instance for User. `TypeComposer` has `GraphQLObjectType` inside, avaliable via method `UserTC.getType()`.
48
+
- Here and in all other places of code variables suffix `...TC` means that this is `TypeComposer` instance, `...ITC` - `InputTypeComposer`, `...ETC` - `EnumTypeComposer`.
50
49
51
50
```js
52
51
importmongoosefrom'mongoose';
@@ -123,8 +122,8 @@ You think that is to much code?
123
122
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.
124
123
125
124
126
-
FAQ
127
-
===
125
+
## FAQ
126
+
128
127
### Can I get generated vanilla GraphQL types?
129
128
```js
130
129
constUserTC=composeWithMongoose(User);
@@ -253,8 +252,8 @@ fragment fullImageData on EmbeddedImage {
253
252
}
254
253
```
255
254
256
-
Customization options
257
-
=====================
255
+
## Customization options
256
+
258
257
When we convert model `const UserTC = composeWithMongoose(User, customizationOptions);` you may tune every piece of future derived types and resolvers.
259
258
260
259
### Here is flow typed definition of this options:
@@ -381,8 +380,8 @@ export type limitHelperArgsOpts = {
This plugin adds `connection` resolver. Build in mechanism allows sort by any unique indexes (not only by id). Also supported compound sorting (by several fields).
388
387
@@ -395,6 +394,6 @@ This plugin completely follows to [Relay Cursor Connections Specification](https
0 commit comments