|
@@ -155,10 +155,6 @@ function mmExpandSchema(gqlSchema){
|
|
|
|
|
|
let newSchema = new GraphQLSchema({query: newQuery, mutation: newMutation})
|
|
let newSchema = new GraphQLSchema({query: newQuery, mutation: newMutation})
|
|
return newSchema;
|
|
return newSchema;
|
|
-
|
|
|
|
- //console.log(types)
|
|
|
|
- //console.log(queryFields)
|
|
|
|
- //console.log(_typeMap.Query.getFields())
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -174,30 +170,6 @@ function mmExpandSchema(gqlSchema){
|
|
Savable.addClass(User)
|
|
Savable.addClass(User)
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
- //type Query {
|
|
|
|
- //login(login: String!, password: String!): String
|
|
|
|
-
|
|
|
|
- //categories: [Category]
|
|
|
|
- //category(_id: ID!): Category
|
|
|
|
-
|
|
|
|
- //goods: [Good]
|
|
|
|
- //good(_id: ID!): Good
|
|
|
|
-
|
|
|
|
- //myOrders: [Order]
|
|
|
|
- //orders: [Order]
|
|
|
|
- //}
|
|
|
|
- //type Mutation {
|
|
|
|
- //createUser(login: String!, password: String!): User
|
|
|
|
- //changePassword(password: String!): User
|
|
|
|
-
|
|
|
|
- //setCategory(cat: CategoryInput!):Category
|
|
|
|
- //setGood(good: GoodInput!):Good
|
|
|
|
- //setOrder(order: OrderInput):Order
|
|
|
|
- //setOrderGood(orderGood: OrderGoodInput):OrderGood
|
|
|
|
- //}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
let schema = buildSchema(`
|
|
let schema = buildSchema(`
|
|
type User {
|
|
type User {
|
|
_id: String
|
|
_id: String
|
|
@@ -225,7 +197,6 @@ function mmExpandSchema(gqlSchema){
|
|
goods: [GoodInput]
|
|
goods: [GoodInput]
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
type Good {
|
|
type Good {
|
|
_id: ID,
|
|
_id: ID,
|
|
createdAt: String
|
|
createdAt: String
|