Ruby on Rails project to demo HTTP caching strategies. Persisted queries allows Apollo Client to refernce cached queries with a hash. Apollo Client will attempt to make a query with a GET method before attempting a POST request for the data.
Note: master
branch will not utalize active record to persist data. All data will be static for demostration purposes.
- Bundle install:
bundle
- Webpack install:
rails webpacker:install
- Yarn install:
yarn
- GraphQL install:
rails generate graphql:install
Make sure the following is included in app/assets/config/manifest.js
//= link graphiql/rails/application.js
//= link graphiql/rails/application.css
rails g graphql:object <object-name>
This will generate Type Defition to describe the shape of your data in app/graphql/types/<object-name>_type.rb
To start Rails server: rails s
visit localhost:3000/graphiql
for GraphiQL
visit localhost:3000
for React App