Apollo Upload Client
apollo-upload-client
A terminating Apollo Link for Apollo Client that fetches a GraphQL multipart request if the GraphQL variables contain files (by default FileList, File, or Blob instances), or else fetches a regular GraphQL POST or GET request (depending on the config and
Charts
graphql
multipart
request
file
upload
apollo
client
link
react
esm
Stars
1.5k
Weekly
887k
Open issues
2
Bundle
~25 kB
Installation
npm install apollo-upload-clientCode example
import { ApolloUploadClient } from "apollo-upload-client";
const data = [
{ name: "Jan", value: 12 },
{ name: "Feb", value: 18 },
];
export function Example() {
return (
<ApolloUploadClient data={data} width={420} height={240}>
{/* series / axes from Apollo Upload Client */}
</ApolloUploadClient>
);
}Pros & cons
Pros
- Actively maintained by Jayden Seric
- 887k weekly downloads. Battle tested
- Tree-shakeable, pay only for what you import
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 2 open issues on GitHub