alv-alvarez / fullstack-tutorial

πŸš€ The Apollo Client request cancellation using AbortController API

Home Page:https://www.apollographql.com/docs/tutorial/introduction.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Controlling Apollo inflight request's using AbortController API

This project is to illustrates the example to cancel the Apollo request using AbortController thus preventing duplicates for the same request.

Read this blog to understand the codebase.

Important files to watch for:

  1. Core library- cancelRequest.ts
  2. Component usage - login.tsx
  3. Final middleware wiring - index.tsx

Apollo tutorial

This is the fullstack app for the Apollo tutorial. πŸš€

File structure

The app is split out into two folders:

  • start: Starting point for the tutorial
  • final: Final version

From within the start and final directories, there are two folders (one for server and one for client).

Installation

To run the app, run these commands in two separate terminal windows from the root:

cd final/server && npm i && npm start

and

cd final/client && npm i && npm start

About

πŸš€ The Apollo Client request cancellation using AbortController API

https://www.apollographql.com/docs/tutorial/introduction.html

License:MIT License


Languages

Language:TypeScript 50.5%Language:JavaScript 47.2%Language:HTML 2.3%Language:Shell 0.1%