Apollo Elements Apollo Elements Guides API Blog Toggle darkmode

Hybrids: Client Factory

Exports

import { client } from '@apollo-elements/hybrids/factories/client';

client

Hybrids descriptor factory for an ApolloElement

Defaults to window.__APOLLO_CLIENT__, which is set by default when creating an Apollo Client. That means that in most cases, it's not necessary to explicity set the client property. For more information see Getting Started: Apollo Client.

Parameters

client

ApolloClient<NormalizedCacheObject> | null

client instance.

options

ClientHybridsFactoryOptions

Options to configure the factory.

Property Type Description
useGlobal
boolean
if false, do not use window.APOLLO_CLIENT by default

Returns

Descriptor<ApolloElementElement<D, V>>

Hybrids descriptor which mixes the ApolloElementInterface in on connect