In this tutorial, you will implement the backend for a Hackernews clone that has the following features:
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:
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.
Learn how to define the GraphQL schema with graphql-ruby, implement query resolvers in Ruby and use a GraphiQL Playground to test your queries.