Skip to content

tmjoen/apollo-absinthe-upload-client

 
 

Repository files navigation

Apollo-Absinthe-Upload-Client

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

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 createNetworkInterface from the package in the construction of your ApolloClient-instance.

import ApolloClient from 'apollo-client'
import { createNetworkInterface } from 'apollo-absinthe-upload-client'

const client = new ApolloClient({
  networkInterface: createNetworkInterface({
    uri: '/graphql'
  })
})

Optional dependencies

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

License

MIT (see LICENSE)

Acknowledgements

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.1%
  • JavaScript 4.9%