1.0.3 • Published 6 years ago

@dailydrip/apollo-absinthe-upload-link v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Build Status

Apollo-Absinthe-Upload-Link

A network interface for Apollo that enables file-uploading to Absinthe back ends.

Usage

Install via yarn or npm and then use createLink from the package in the construction of your ApolloClient-instance.

import ApolloClient from "apollo-client";
import { createLink } from "apollo-absinthe-upload-link";

const client = new ApolloClient({
    link: createLink({
        uri: "/graphql"
    })
});

Custom headers

Custom headers can be passed through options of the link.

import ApolloClient from "apollo-client";
import { createLink } from "apollo-absinthe-upload-link";

const headers = { authorization: 1234 } 
const client = new ApolloClient({
    link: createLink({
        uri: "/graphql"
    }),
    headers,
});

Usage with React Native

Not tested. Contributing is welcome.

License

MIT (see LICENSE)

Acknowledgements