Radoslav Stankov
Written By
Radoslav Stankov
Developer @ Product Hunt

Radoslav is a developer for more than a decade and the organizer of React.Sofia meetup. He believes that frontend and backend are equally important and GraphQL is the best way to connect them.

Getting Started

Defining the Scope

In this tutorial, you will implement the backend for a Hackernews clone that has the following features:

  • show a list of links
  • authentication system
  • users can create new links
  • users can vote for links

Install Dependencies

It’s time for you to create your project!

First, you’ll need to have Ruby installed on your system. If that’s not the case, make sure to install it now. This tutorial requires version 2.3.0 or higher.

This will install and start a new Ruby On Rails project. When you visit http://localhost:3000 in a browser, you should see:

Yay! You're on Rails!

Setup Server

Now, let’s add GraphQL to the server. First, stop the server.

Usually you don’t need to restart Ruby On Rails, but when you are adding new gems (libraries), this is required.

This will install all the necessary dependencies you need to get started with GraphQL and Ruby.

Next Chapter

Queries

Learn how to define the GraphQL schema with graphql-ruby, implement query resolvers in Ruby and use a GraphiQL Playground to test your queries.

Go to next chapter