0.0.3-development.2 • Published 12 months ago

apollo-tauri-link v0.0.3-development.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

apollo-tauri-link

This is a terminating link for Apollo Client for Tauri. This package allows you to use Apollo Client in your Tauri application. This is a terminating link, which which replaces the usual createHttpLink. It is responsible for sending the request to the server and returning the response using tauris invoke function.

Take advantage of Apollo Client's caching, error handling, and more.

⚠ Warning

This package is in early development and is not yet ready for production use. Please use with caution. There are no tests and it does not yet support subscriptions.

Installation

npm install apollo-tauri-link

Usage

import { ApolloClient, InMemoryCache } from "@apollo/client";
import { createTauriLink } from "apollo-tauri-link";

const client = new ApolloClient({
  link: createTauriLink(),
  cache: new InMemoryCache(),
});

License

MIT