mock frontend backend for amazon delivery to ukraine service
Ivan Asmer a8f7fe7047 schema fixes | 5 years ago | |
---|---|---|
public | 5 years ago | |
.gitignore | 5 years ago | |
README.md | 5 years ago | |
anon.js | 5 years ago | |
index.js | 5 years ago | |
models.js | 5 years ago | |
package-lock.json | 5 years ago | |
package.json | 5 years ago |
Mock Back for amazon delivery service:
type User {
_id: String
createdAt: String
login: String
nick : String
avatar: Image
}
input UserInput {
_id: String
login: String
nick : String
avatar: ImageInput
}
type Image {
_id: ID,
text: String,
url: String,
originalFileName: String,
userAvatar: User,
order: Order
owner: User
}
input ImageInput {
_id: ID,
text: String,
userAvatar: UserInput,
order: OrderInput
}
type Order {
_id: ID
executor: User
messages: [Message]
comments: [Comment]
images: [Image]
link: String,
name: String,
price: Float,
details: String,
quantity: Int,
delivery_counter: Int,
address_from: String
address_to: String
time_of_delivery: String
owner: User
}
input OrderInput {
_id: ID
executor: User
messages: [MessageInput]
comments: [CommentInput]
images: [Image]
link: String,
name: String,
price: Float,
details: String,
quantity: Int,
delivery_counter: Int,
address_from: String
address_to: String
time_of_delivery: String
}
type Message {
_id: ID
owner: User
order: Order
title: String,
text: String,
}
input MessageInput {
_id: ID
order: OrderInput
title: String,
text: String,
}
type Comment {
_id: ID
owner: User
order: Order
title: String,
text: String,
}
input CommentInput {
_id: ID
order: OrderInput
title: String,
text: String,
}
type Query {
UserFind(query: String): [User]
UserCount(query: String): Int
UserFindOne(query: String): User
ImageFind(query: String): [Image]
ImageCount(query: String): Int
ImageFindOne(query: String): Image
OrderFind(query: String): [Order]
OrderCount(query: String): Int
OrderFindOne(query: String): Order
MessageFind(query: String): [Message]
MessageCount(query: String): Int
MessageFindOne(query: String): Message
CommentFind(query: String): [Comment]
CommentCount(query: String): Int
CommentFindOne(query: String): Comment
}
type Mutation {
UserDelete(user: UserInput): User
UserUpsert(user: UserInput): User
ImageDelete(image: ImageInput): Image
ImageUpsert(image: ImageInput): Image
OrderDelete(order: OrderInput): Order
OrderUpsert(order: OrderInput): Order
MessageDelete(message: MessageInput): Message
MessageUpsert(message: MessageInput): Message
CommentDelete(comment: CommentInput): Comment
CommentUpsert(comment: CommentInput): Comment
}
type Query {
login(login: String!, password: String!): String
}
type Mutation {
createUser(login: String!, password: String!): User
changePassword(login: String!, password: String!, newPassword: String!): User
}
type User {
_id: String
login: String
}