https://github.com/fernandohenriques/graphql-on-rails
A simple implementation of GraphQL in Ruby on Rails, to use like a boilerplate.
https://github.com/fernandohenriques/graphql-on-rails
graphiql graphql ruby ruby-on-rails
Last synced: 3 months ago
JSON representation
A simple implementation of GraphQL in Ruby on Rails, to use like a boilerplate.
- Host: GitHub
- URL: https://github.com/fernandohenriques/graphql-on-rails
- Owner: fernandohenriques
- Created: 2019-06-04T13:38:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T20:12:36.000Z (about 2 years ago)
- Last Synced: 2025-02-01T11:34:42.270Z (3 months ago)
- Topics: graphiql, graphql, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 63.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GraphQL on Rails
This is a implementation of the tutorial [How to GraphQL](https://www.howtographql.com/graphql-ruby/1-getting-started/) with improvements in architecture.
## Installation
Install dependencies:
```
bundle installrails 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:
```graphql
{
allLinks {
id
url
description
}
}```
Creates new link:
```graphql
mutation {
createLink(url:"http://example.com", description:"Example") {
id
url
description
}
}
```