Giter Site home page Giter Site logo

roda_graphql_boilerplate's Introduction

Setup

  1. copy example database connection configuration file cp config/database.yml.example config/database.yml
  2. create development and test databases and fill in a configuration file config/database.yml
  3. run migrations rake db:migrate
  4. copy example ENV configuration file cp config/env.yml.example config/env.yml
  5. fill in a ENV configuration file
  6. run server puma -C config/puma.rb

Developing

  1. to jump into development console just type bin/console
  2. you can use binding.pry anytime and anywhere in the app
  3. graphiQL explorer is available under http://localhost:3000/graphiql
  4. to create GraphQL API changelog just run rake graphql:schema:dump

Testing

  1. application has already preconfigured rspec, so do as usual rspec spec
  2. application has already preconfigured github actions, firing up on every Pull Request

Migrations

  1. generate migration file rake generate:migration i-am-the-migration-name
  2. fill in created migration (db/migrations), for instance:
Sequel.migration do
  change do
    run 'CREATE EXTENSION "uuid-ossp"'
    create_table(:artists) do
      column :id, :uuid, default: Sequel.function(:uuid_generate_v4), primary_key: true
      String :name, null: false
      DateTime :created_at, null: false, default: Sequel.function(:now)
      DateTime :updated_at, null: false, default: Sequel.function(:now)
    end
  end
end
  1. run migration rake db:migrate

roda_graphql_boilerplate's People

Contributors

michalg- avatar

Stargazers

Rafał Camlet avatar Adam Piotrowski avatar

Watchers

 avatar Krzysztof Piotrowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.