Wrapping Tesco Groceries REST API in GraphQL
Using:
- GraphQL Yoga
- Apollo Engine & Apollo Server
- Docker
type Query {
meals: [Meal]
}
type Meal @cacheControl(maxAge: 60) {
id: ID
name: String
products: [Product]
}
type Product @cacheControl(maxAge: 60) {
id: ID
name: String
articles: [Article]
}
type Article @cacheControl(maxAge: 60) {
id: ID
tpnb: Int
name: String
image: String
description: String!
portion: String
}
You'll need to get two API Keys
Then
docker-compose up
And out to the playground...
(By default)
http://localhost:4000