Skip to content

svhawks/rails-graphql-generator-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails GraphQL Generator Demo

In this app GraphQl Relay Schema generated by Rails GraphQL Generator gem.

Usage

git clone git@github.com:movielala/rails-graphql-generator-demo.git

cd rails-graphql-generator-demo

bundle install

rake db:migrate
rake db:seed

rails s

and then open http://localhost:3000/graphiql and run example queries.

query getMovies{
	root {
    movies{
      edges{
        node{
          id
          name
          ranking
          director{
            name
          }
        }
      }
    }
  }
}
mutation createPerson {
  createPerson(input: { clientMutationId: "1", name: "Tom Hanks", ranking: 1 }) {
    person {
      id
      name
      ranking
    }
  }
}