Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Chapter 6 - GraphQL Clients

With your GraphQL server built, it's now time to set up GraphQL on the client side. Very broadly, a client is just an application that communicates with a server. Due to the flexibility of GraphQL, there's no prescription for how to build a client. All you really need to send queries and mutations is the ability to send an HTTP request. Once the service responds with some data, you can use it in your client no matter what that client is.

Simple Clients

The following samples are in CodeSandbox. You will find the code in the src/index.js file for each sample. Be sure to expand the CodeSandbox console to see the results. Also, be sure to

  1. Fetch Client - console
  2. Fetch Client - browser
  3. GraphQL Request - query
  4. GraphQL Request - mutation
  5. GraphQL Request - app

PhotoShare App

This folder contains the server and the client for Chapter 6. Run the server then either run the client project or view it on CodeSandbox.

Be sure to add your GitHub CLIENT_ID to the .env file:

REACT_APP_CLIENT_ID=<YOUR_ID_HERE>

Resources