This app is a GraphQL API for Restaurant Menu.
I logged my work notes here
Access the GraphiQL interface via: https://resto-menu-api-3c61fad65343.herokuapp.com/graphiql
You can check GraphQL Fixtures for some sample queries
cat .ruby-version
> 3.3.1
Run the following if you do not have this version:
brew upgrade ruby-build
rbenv install 3.3.1
Running locally requires sqlite
bundle install
bundle exec rails db:setup db:migrate db:seed
bundle exec rails server
Application is available at localhost:3000
POST /graphql
: the main graphql endpointGET /graphiql
: provides an interface to craete a request
NOTE: Ideally, the /graphiql
endpoint is not accessible in prod. However, since we are just using dummy data, this endpoint is exposed for easier testing.
This application uses RSpec for testing.
In addition, factory helpers like factory_bot
and faker
were used to generate dummy data for test.
Run the tests via:
bundle exec rspec