Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 738 Bytes

README.md

File metadata and controls

62 lines (43 loc) · 738 Bytes

GraphQL on Rails

This is a implementation of the tutorial How to GraphQL with improvements in architecture.

Installation

Install dependencies:

bundle install

rails db:create
rails db:migrate
rails db:seed

Starting the server:

rails s

Opening the application:

open http://localhost:3000/

Opening GraphQL playground:

open http://localhost:3000/graphiql

Sample GraphQL Queries and mutation

List all links:

{
  allLinks {
    id
    url
    description
  }
}

Creates new link:

mutation {
  createLink(url:"http://example.com", description:"Example") {
    id
    url
    description
  }
}