urql-absinthe-upload-exchange
v1.2.0
Published
Urql exchange to support file uploads to an (Elixir) Absinthe backend
Downloads
84
Maintainers
Readme
urql-absinthe-upload-exchange
Urql exchange to support file uploads to an (Elixir) Absinthe backend
Usage
Install the package:
npm install urql-absinthe-upload-exchange
Add the exchange to your urql client, right before the fetch exchange:
import { createClient, dedupExchange, cacheExchange, fetchExchange } from 'urql';
import absintheUploadExchange from 'urql-absinthe-upload-exchange';
const client = createClient({
url: 'http://localhost:4000/graphql',
exchanges: [dedupExchange, cacheExchange, absintheUploadExchange, fetchExchange],
});
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgements
This project is based on code originally provided by Harry Grumbar in this gist. Used with permission.