Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApolloElement<TData>

Gluon base class for apollo custom elements.

Type parameters

  • TData

Hierarchy

  • ApolloElement<GluonElement, this> & GluonElement<this>
    • ApolloElement

Implements

Index

Constructors

constructor

Properties

Private __data

__data: TData = null

Private __document

__document: DocumentNode = null

Private __error

__error: Error | ApolloError = null

Private __errors

__errors: readonly GraphQLError[] = null

Private __loading

__loading: boolean = false

Private __mo

client

The apollo client instance.

Optional context

context: Record<string, unknown>

data

data: TData

error

errors

errors: readonly GraphQLError[]

loading

loading: boolean

Static Readonly is

is: string

Accessors

document

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

createRenderRoot

  • createRenderRoot(): ReturnType<HTMLElement["attachShadow"]> | Node

disconnectedCallback

  • disconnectedCallback(): void

render

  • render(options?: { sync: boolean }): Promise<void>
  • Parameters

    • Optional options: { sync: boolean }
      • sync: boolean

    Returns Promise<void>