apollo-link-upload
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

apollo-link-upload

Build Version Size License

This package can be used to perform file uploads. It is compatible with Absinthe and GraphQL::Extras.

Features

  • Written in TypeScript.
  • Simple server-side implementation.
  • Support for FileList and multiple file uploads.
  • Supports React Native.

Supported Backends

Usage

import ApolloClient from "apollo-client";
import { createUploadLink } from "apollo-link-upload";
 
const client = new ApolloClient({
  link: createUploadLink({ uri: "/graphql" })
});

React Native

Values submitted in React Native will only be recognized as a file if it is an instance of ReactNativeFile.

import { ReactNativeFile } from "apollo-link-upload";
 
const file = new ReactNativeFile({
  uri: "something",
  name: "a.jpg",
  type: "image/jpeg"
});

Similar Packages

Contributing

To install dependencies:

$ yarn install

To run the test suite:

$ yarn test

Readme

Keywords

none

Package Sidebar

Install

npm i apollo-link-upload

Weekly Downloads

15

Version

0.4.0

License

MIT

Unpacked Size

70.4 kB

Total Files

22

Last publish

Collaborators

  • rzane