Giter Site home page Giter Site logo

graphql-ruby-hands-on's Introduction

devcontainer for Ruby 3.1 and Rails 7.0

Ruby3.1, Ruby on Rails 7.0 の開発環境用の devcontainer

devcontainerを利用する

remote container のインストール

※ devcontainer に必要なツールのインストールはこちら

devcontainerの起動

  1. VSCodeを開き、 Reopen in Container を実行する

操作

サーバーの立ち上げ

devcontainer上でTerminalを開き、コマンドを実行する

$ bin/rails s

Type Checking

# gem collection の install
$ bundle exec rbs collection install

# rbs_rails
$ bin/rake rbs_rails:all

# Steep check
$ bundle exec steep check

Solargraph

# Generate documentation for bundled gems
$ bundle exec solargraph bundle

# Download Ruby core documentation
$ bundle exec solargraph download-core

Debugging

devcontainer上で、 デバッグを実行 を実行する(ショートカットキー: F5)

デバッグを実行 を利用するとVSCode Debuggingが利用可能

debugging

VSCode extensions

構成

docker compose で構成

リファレンス

graphql-ruby-hands-on's People

Contributors

samuraikun avatar

Watchers

 avatar

graphql-ruby-hands-on's Issues

Dataloaderを利用してN+1を回避するクエリを実装する

Description

info

Ruby(Rails)でのdatalaoderによるリクエスト処理をする場合の選択肢

graphql-batch

  • ShopifyがOSSで開発しているGem
    • dataloader自体が非同期処理前提のためRubyでの非同期処理を実現させるため内部でpromise.rbを利用している
    • promise.rb自体はほぼメンテされていないのであまり筋がよいとは言えなさそう。。
  • 採用事例は豊富

graphql-rubyに同梱されている GraphQL::Dataloader

batch-loader

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.