food-graphql-server/schema.gql

71 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-02-01 13:36:26 +00:00
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
2021-02-02 15:52:57 +00:00
"""
The javascript `Date` as string. Type represents date and time as the ISO Date string.
"""
scalar DateTime
2021-02-02 10:34:34 +00:00
type Mutation {
2021-02-02 15:52:57 +00:00
"""Create a new reservation"""
2021-02-05 14:24:02 +00:00
createReservation(input: ReservationInput): Reservation
2021-02-02 15:52:57 +00:00
2021-02-02 10:34:34 +00:00
"""Create a new store"""
2021-02-05 14:24:02 +00:00
createStore(input: StoreInput): Store
2021-02-02 14:08:42 +00:00
}
type Product {
2021-02-05 14:24:02 +00:00
description: String
id: String
name: String
price: Float
2021-02-02 10:34:34 +00:00
}
2021-02-01 13:36:26 +00:00
type Query {
2021-02-02 14:08:42 +00:00
"""Get a specific store"""
2021-02-05 14:24:02 +00:00
store(id: String): Store
2021-02-02 14:08:42 +00:00
2021-02-02 10:34:34 +00:00
"""Get all the stores"""
2021-02-05 14:24:02 +00:00
stores: [Store]
2021-02-02 15:52:57 +00:00
}
type Reservation {
2021-02-05 14:24:02 +00:00
date: DateTime
id: String
reservationProducts: [ReservationProduct]
2021-02-02 15:52:57 +00:00
}
input ReservationInput {
2021-02-05 14:24:02 +00:00
reservationProducts: [ReservationProductInput]
2021-02-02 15:52:57 +00:00
}
type ReservationProduct {
2021-02-05 14:24:02 +00:00
product: Product
quantity: Int
2021-02-02 15:52:57 +00:00
}
input ReservationProductInput {
2021-02-05 14:24:02 +00:00
productId: String
quantity: Int
2021-02-01 13:36:26 +00:00
}
type Store {
2021-02-05 14:24:02 +00:00
city: String
id: String
name: String
number: Int
postalCode: String
products: [Product]
street: String
2021-02-02 10:34:34 +00:00
}
2021-02-01 13:36:26 +00:00
2021-02-02 10:34:34 +00:00
input StoreInput {
2021-02-05 14:24:02 +00:00
city: String
name: String
number: Int
postalCode: String
street: String
2021-02-01 13:36:26 +00:00
}