Skip to content

grvty-labs/apollo-absinthe-upload-link

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apollo-Absinthe-Upload-Link

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

Difference between apollo-absinthe-upload-client and apollo-absinthe-upload-link

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

Difference between apollo-upload-client and apollo-absinthe-upload-client

Both Apollo, through apollo-upload-server, and Absinthe support file-uploads through GraphQL-mutations, unfortunately, they differ in their protocol.

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"
    })
});

Usage with React Native

Not tested. Contributing is welcome.

Optional dependencies

This library uses fetch, if you target older browsers you can polyfill both.

License

MIT (see LICENSE)

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%