wx-apollo-fetcher

apollo httpLink fetcher for wx

Usage no npm install needed!

<script type="module">
  import wxApolloFetcher from 'https://cdn.skypack.dev/wx-apollo-fetcher';
</script>

README

wx-apollo-fetcher

在微信小程序中使用apollo client所需要的fetcher

安装

npm install wx-apollo-fetcher --save

或者

yarn add wx-apollo-fetcher

使用

import { createHttpLink } from "apollo-link-http"; // 或者 apollo-link-batch-http
import wxApolloFetcher from "wx-apollo-fetcher";

const link = createHttpLink({ 
    uri: "xxxxx",
    fetch: wxApolloFetcher,
});