Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@urql/exchange-multipart-fetch

Package Overview
Dependencies
Maintainers
25
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@urql/exchange-multipart-fetch

An exchange that allows regular fetch and will transition to multipart when files are included

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.8K
decreased by-3.21%
Maintainers
25
Weekly downloads
 
Created
Source

@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!

Keywords

FAQs

Package last updated on 31 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc