A network interface for Apollo that enables file-uploading to Absinthe back ends.
apollo-absinthe-upload-client
was developed for first version of Apollo Client and it can't be used with second
version. This package was rewritten specifically for second version which supports
new middleware and link ibterface
Both Apollo, through
apollo-upload-server
,
and Absinthe support file-uploads through GraphQL-mutations, unfortunately, they
differ in their protocol.
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"
})
});
Not tested. Contributing is welcome.
This library uses fetch
, if you target older browsers you can polyfill both.
MIT (see LICENSE)
- @labtwentyfive's
apollo-absinthe-upload-client