This README would normally document whatever steps are necessary to get the application up and running.
- Clone the application
git clone [email protected]:shashank76/rails-graphql.git
cd rails-graphql
bundle install
- Database creation and data seeding
rails db:create db:migrate db:seed
- run server and test graphQL apis
rails server
- After running the server open link in browser
http://localhost:3000/graphiql
- and run the below query in query prompt
- Query for list all blogs
{
blogs{
id
title
description
userName
updatedAt
}
}
- Query for get a specific blog
query getBlog($id: ID!){
blog(id: $id){
title
description
userName
updatedAt
}
}
and use below id structure in variables
{
"id": 2
}