/sinatra-graphql

Step by step tutorial to write a graphql server in sinatra (ruby)

Primary LanguageRuby

GraphQL server with Sinatra (Ruby)

A step by step tutorial to write a graphql server in sinatra (ruby), using the graphql gem.

Steps

  • STEP 1: Create a Sinatra application
  • STEP 2: Add JSON responses
  • STEP 3: Add database connections and models with ActiveRecord
  • STEP 4: Add graphql and define a query to list speakers
  • STEP 5: Adding a Mutation root type
  • STEP 6: Define a Mutation for speaker creation

Read more at Medium

Part 1 - Sinatra Setup and Querying

Part 2 - Mutations