dgraph-orm
Simplified schema creation, queries and mutations for Dgraph.
Installation
npm install dgraph-orm
Full Documentation
https://ashokvishwakarma.github.io/dgraph-orm
Your first schema and model
; const UserSchema = 'user' name: type: dgraphTypesSTRING index: true token: term: true email: type: dgraphTypesSTRING index: true unique: true token: exact: true password: dgraphTypesPASSWORD bio: dgraphTypesSTRING friend: type: dgraphTypesUID model: 'user' // related model name count: true reverse: true ; /** * Set and create model out of the schema */const User = dgraph; /** * Creates a new user with passed fields * * Returns the created user along with the generated uid */const user = await User; console;// {// uid: '0x1',// name: 'Ashok Vishwakarma',// email: 'akvlko@gmail.com',// bio: 'My bio ...'// }
For the full documentation please visit the below link
https://ashokvishwakarma.github.io/dgraph-orm
Futute releases
- Other geo queries within, intersects
- Group by
- Aggregation
Contribution
Issues and pull requests are welcome for
- Unit test cases
- Feature and query method implementation
- Bug fixes