Browse Source

basic models

Ivan Asmer 5 years ago
parent
commit
915ea60777
3 changed files with 13 additions and 5 deletions
  1. 2 2
      README.md
  2. 2 2
      index.js
  3. 9 1
      package.json

+ 2 - 2
README.md

@@ -8,8 +8,8 @@ Basic relations
 
 
 ```
-User: Owner, Following, Followers
-Post: Images, Like
+User: Owner, Following, Followers, Like, Direct, Image(avatar)
+Post: Images, Like, Comments, Directs, Collections
 Images: Avatar, Posts, Direct
 Comments: Post, Comment (tree), Like
 Like: Post, Comment, User, Direct

+ 2 - 2
index.js

@@ -4,12 +4,12 @@ const express = require('express');
 const express_graphql = require('express-graphql');
 
 const { buildSchema, printSchema } = require('graphql');
-const expand = require('./expand')
+const expand = require('mm-graphql/expand')
 
 ;(async () => {
 
     const {Savable, slice, getModels} = await require('./models.js')()
-    const jwtGQL = require('./jwt')
+    const jwtGQL = require('mm-graphql/jwt')
 
     const {anonSchema, anonResolvers} = require('./anon')({Savable, secret: jwtSecret})
 

+ 9 - 1
package.json

@@ -19,5 +19,13 @@
     "instagram"
   ],
   "author": "Ivan Grynkin",
-  "license": "MIT"
+  "license": "MIT",
+  "dependencies": {
+    "express": "^4.17.1",
+    "express-graphql": "^0.9.0",
+    "graphql": "^14.4.2",
+    "jsonwebtoken": "^8.5.1",
+    "mm": "git+ssh://git@gitlab.a-level.com.ua:gitgod/mm.git",
+    "mm-graphql": "git+ssh://git@gitlab.a-level.com.ua:gitgod/mm-graphql.git"
+  }
 }