mock frontend backend for amazon delivery to ukraine service

Ivan Asmer a8f7fe7047 schema fixes 5 years ago
public 7ac6b96c1b shop clone 5 years ago
.gitignore 18aa7adf75 Initial commit 5 years ago
README.md 21d3f2e508 alpha changes 5 years ago
anon.js 7ac6b96c1b shop clone 5 years ago
index.js a8f7fe7047 schema fixes 5 years ago
models.js e7149ff75a alpha changes 5 years ago
package-lock.json 7ac6b96c1b shop clone 5 years ago
package.json 7ac6b96c1b shop clone 5 years ago

README.md

shop

Mock Back for amazon delivery service:

Main GraphQL

        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
}


Anon graphql

        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
        }