Skip to content

robertziel/facebook_post_example_api

Repository files navigation

Facebook like posts app example GraphQL API

Build Status Coverage Status

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

Quick start

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

Before commit

Set up overcommit to make sure your code is clean :) :

gem install overcommit
bundle install --gemfile=.overgems.rb
overcommit --install

Then you can commit your changes! And don't forget to run specs before:

bundle exec rspec

To do

  • 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

About

Facebook news feed example API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages