Urql exchange to support file uploads to an (Elixir) Absinthe backend
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],
});
This project is licensed under the MIT License. See the LICENSE file for details.
This project is based on code originally provided by Harry Grumbar in this gist. Used with permission.