This package has been deprecated

Author message:

This package is now obsolete and `@urql/core` now supports GraphQL Multipart Requests (File Uploads) natively.

@urql/exchange-multipart-fetch
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@urql/exchange-multipart-fetch

DEPRECATION NOTICE: The multipartFetchExchange has been deprecated, and @urql/core now supports GraphQL Multipart Requests natively. This won't break the behaviour of your existing apps, however, it's recommended to remove the multipartFetchExchange from your apps.

The multipartFetchExchange is an exchange that builds on the regular fetchExchange but adds the multipart file upload capability.

Quick Start Guide

First install @urql/exchange-multipart-fetch alongside urql:

yarn add @urql/exchange-multipart-fetch
# or
npm install --save @urql/exchange-multipart-fetch

You'll then need to add the multipartFetchExchange method, that this package exposes, to your exchanges.

import { createClient, dedupExchange, cacheExchange } from 'urql';
import { multipartFetchExchange } from '@urql/exchange-multipart-fetch';

const client = createClient({
  url: 'http://localhost:1234/graphql',
  exchanges: [dedupExchange, cacheExchange, multipartFetchExchange],
});

Now we can start uploading files to our server!

Readme

Keywords

Package Sidebar

Install

npm i @urql/exchange-multipart-fetch

Weekly Downloads

10,462

Version

1.1.0

License

MIT

Unpacked Size

45.8 kB

Total Files

13

Last publish

Collaborators

  • scottianstewart
  • keithluchtel
  • ceceppa
  • robwalkerco
  • sarahformidable
  • scott-rippey
  • michaelmerrill
  • sarmeyer
  • mariano-formidable
  • ryan.roemer
  • formidable-owner
  • formidablelabs
  • carbonrobot
  • masiddee
  • philpl
  • andyrichardson
  • jdecroock
  • parkerziegler
  • npm-urql