This package has been deprecated

Author message:

This package was moved to @8base-react/app-provider package. Use it instead.

@8base/apollo-provider

0.1.5 • Public • Published

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>

Dependencies (0)

    Dev Dependencies (15)

    Package Sidebar

    Install

    npm i @8base/apollo-provider

    Weekly Downloads

    2

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    218 kB

    Total Files

    10

    Last publish

    Collaborators

    • dav1nx1
    • jorge.osorio
    • 8base-bot