Restaurant daily meal offers GraphQL API
{
restaurants {
id
}
}
{
restaurants (
# filter by restaurant. Exclude by prefixing with !.
id: "selih"
# to calculate distance we need reference location
loc: {lat: 46.522425 lon: 15.669608}
# max distance to filter by
# distance: 2
) {
# list fields you're interested in
# use ctrl+space for autocomplete
id
name
location {
lat
lon
}
distance
# this will fetch live data from source
# remove date argument to display all dates
# dailyOffers (date: "2015-11-13" type: "MALICA") {
# date
# offers {
# text
# type
# price
# allergens
# }
# }
}
}
{
r1: restaurants (id: "selih") {
id
}
r2: restaurants (id: "!selih") {
id
}
}
npm install
npm start
Using FacebookGraphProvider
you need FB_APP_ID
& FB_APP_SECRET
env. vars. set.
# run lint, tests & generate coverage
npm test
# run tests only
npm run mocha
There is a GUI with restaurants & voting using this service.