@8base/apollo-provider

This is wrapper under the Apollo Provider with fetching 8base [unions and interfaces.](https://www.apollographql.com/docs/react/recipes/fragment-matching.html) on start application.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@8base/apollo-provider
Minified + gzip package size for @8base/apollo-provider in KB

Readme

8base Apollo Provider

This is wrapper under the Apollo Provider with fetching 8base unions and interfaces. on start application.

ApolloProvider

Table of Contents

ApolloProvider

Extends PureComponent

Provider fetch interfaces fragments schema and create apollo client

Properties

  • children (React$Node | Function) Children of the provider. Could be either react node or function with loading state.
  • uri string Children 8base endpoint
  • getClient Function 8base endpoint

Usage

  import { createApolloClient, createApolloLinks } from '@8base/create-apollo-client';
  import { ApolloProvider } from '@8base/apollo-provider';

  const getClient: Function = createApolloClient({
    links: createApolloLinks({ getAuthState, uri }),
  });

  <ApolloProvider 
    getClient={ getClient }
    uri={ uri }
  >
    { ({ isLoading }) => children }
  </ApolloProvider>

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.