Negligent Parachute Maintainers

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

    0.1.14 • Public • Published

    @urql/exchange-multipart-fetch

    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!

    Install

    npm i @urql/exchange-multipart-fetch

    DownloadsWeekly Downloads

    11,155

    Version

    0.1.14

    License

    MIT

    Unpacked Size

    36.3 kB

    Total Files

    15

    Last publish

    Collaborators

    • yankovalera
    • valgeorgiev
    • michaelmerrill
    • sarmeyer
    • mariano-formidable
    • carlospaelinck
    • ryanisinallofus
    • samwhale
    • ryan.roemer
    • formidable-owner
    • eastridge
    • exogen
    • beccanelson
    • philpl
    • hartzis
    • mfulgham
    • jmcbee1
    • formidablelabs
    • carbonrobot
    • manosim
    • masiddee
    • andyrichardson
    • jdecroock
    • parkerziegler
    • npm-urql