Starting Simple

Learn the basics of the front-end.

Introduction

Using a GraphQL API from the client-side doesn’t necessitate a large framework or a lot of tooling. A plain old JavaScript script will do. We’re going to start by building the simplest of JavaScript projects just to illustrate how to configure a basic client. We’ll set this up as a separate project from the PlateSlate Phoenix-based application.

Dependencies required for the front-end

The following dependencies are required for the front-end:

  1. npm
  2. yarn

Note: Everything is already set up for us.

We’ll make a new directory for our project change to that directory, and instruct yarn to bootstrap it with a basic package.json file. We do this to keep track of our project metadata and dependencies:

Get hands-on with 1400+ tech skills courses.