Skip to content

Instantly share code, notes, and snippets.

@DanielCender
Created November 21, 2019 04:42
Show Gist options
  • Save DanielCender/b8a851854e242e78258f0f0d533110b0 to your computer and use it in GitHub Desktop.
Save DanielCender/b8a851854e242e78258f0f0d533110b0 to your computer and use it in GitHub Desktop.
Sample AWS Amplify GraphQL Schema
type Barista @model {
id: ID!
name: String!
orders: [Order] @connection(name: "BaristaCurrentOrders")
}
type Coffee @model {
id: ID!
name: String!
ingredients: [Ingredient]
order: Order! @connection(name: "CoffeeOrder")
}
type Customer @model {
id: ID!
name: String!
order: [Order]! @connection(name: "OrderCustomer")
barista: Barista! @connection(name: "CustomerBarista")
}
type Ingredient {
name: String!
}
type Order @model {
id: ID!
drinks: [Coffee] @connection(name: "CoffeeOrder")
customer: Customer! @connection(name: "OrderCustomer")
barista: Barista! @connection(name: "BaristaCurrentOrders")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment