Search⌘ K
AI Features

Starting Simple

Explore setting up a simple JavaScript project to connect with a GraphQL API from the client side. Learn to create a basic package setup, static web server using Express, and test data fetching to display GraphQL API content in a front-end environment.

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

...