3 Simple Steps
Install
Totally plug-in-play
# Add the gem to your Gemfile
$ bundle add rails-graphql
# Then run the Rails generator
$ rails g graphql:install
Define
Designed for simple and complex Schemas
# app/graphql/app_schema.rb
class GraphQL::AppSchema < GraphQL::Schema
field(:welcome).resolve { 'Hello World!' }
end
Run
Follows Rails core principles
$ curl -d '{"query":"{ welcome }"}' \
-H "Content-Type: application/json" \
-X POST http://localhost:3000/graphql
# {"data":{"welcome":"Hello World!"}}
License
Copyright © 2020-2023 VirtualShield LLC. See The MIT License for further details.