Options
All
  • Public
  • Public/Protected
  • All
Menu

ApolloElement

🚀 Custom element base class for apollo custom elements.

Type parameters

  • TData

Hierarchy

  • ApolloElement<LitElement, this> & LitElement<this>
    • ApolloElement

Implements

Index

Constructors

constructor

  • Parameters

    • Rest ..._: any[]

    Returns ApolloElement

Properties

Private __document

__document: DocumentNode = null

Private __mo

client

client: ApolloClient<NormalizedCacheObject> = window.__APOLLO_CLIENT__

Optional context

context: Record<string, unknown>

data

data: TData = null

error

error: Error | ApolloError = null

errors

errors: readonly GraphQLError[] = null

loading

loading: boolean = false

Accessors

Methods

Optional adoptedCallback

  • adoptedCallback(): void
  • Called when the element is adopted to a document.

    Returns void

Optional attributeChangedCallback

  • attributeChangedCallback(name: string, oldValue: string, newValue: string): void
  • Called when one of the element's observedAttributes changes.

    Parameters

    • name: string

      name of the observed attribute

    • oldValue: string

      previous value of the attribute. null if it was nonexistent

    • newValue: string

      current value of the attribute. null if removed.

    Returns void

connectedCallback

  • connectedCallback(): void

disconnectedCallback

  • disconnectedCallback(): void