@dailydrip/apollo-absinthe-upload-link
v1.0.3
Published
A network interface for Apollo that enables file-uploading to Absinthe back ends.
Downloads
3
Readme
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
- @labtwentyfive's
apollo-absinthe-upload-client