Skip to content

matjaz/kam-jest

Repository files navigation

kam-jest

Greenkeeper badge

Build status Code Climate Codeship Status for matjaz/kam-jest Coverage Status js-standard-style Dependencies devDependencies

Restaurant daily meal offers GraphQL API

Query examples

Get all restaurant ids

{
  restaurants {
    id
  }
}

Try it!

Full query with comments

{
  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
#       }
#     }
 
  }
} 

Multi query

{
  r1: restaurants (id: "selih") {
    id
  }
  r2: restaurants (id: "!selih") {
    id
  }
}

Install

npm install
npm start

Using FacebookGraphProvider you need FB_APP_ID & FB_APP_SECRET env. vars. set.

Development

# run lint, tests & generate coverage
npm test

# run tests only
npm run mocha

GUI

There is a GUI with restaurants & voting using this service.

About

Restaurant daily meal offers GraphQL API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published