Init based on boilerplate: https://github.com/robertziel/rails_graphql_jwt_devise_auth_boilerplate
Client (ReactJS): https://github.com/robertziel/facebook_post_example_client
Technology:
- Rails
- GraphQL
- Devise JWT
- MySQL
Clone env_sample to .env for local development.
cp .env.example .env
Install the bundle:
bundle install
Make sure you have MySQL working.
Default user is set to root in config/database.yml.
Then you can prepare your database:
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed
Run the development server (I used port 8080 for backend and 3000 for client):
rails s -p 8080
Set up overcommit to make sure your code is clean :) :
gem install overcommit
bundle install --gemfile=.overgems.rb
overcommit --installThen you can commit your changes! And don't forget to run specs before:
bundle exec rspec- Better posts truncate if first paragraph is short
- Move all ActiveCable transmissions to separate jobs
- Integration specs for subscriptions
- In specs there are some warnings to fix
- Reactions subscription would be nice
- Order data by created_at instead of id in AllPosts and AllComments resolvers