API
Apollo Elements consists of a core of reactive controllers, packages for various web-components libraries, ready-made HTML elements, some library helpers, and this documentation.
Core
The core controllers do all the heavy-lifting, interacting with the Apollo Client and exposing an interface with your app. All three controllers extend from a common base class.
The core controllers work directly with any ReactiveControllerHost
, e.g. LitElement
.
- Queries: Fetch GraphQL data
- Mutations: Update your Graph
- Subscriptions: Receive real-time updates
Libraries
Whatever your preference for how to build web components, there's a flavour of Apollo Elements for you and your team. You can even mix-and-match in the same project, thanks to the common interface of HTML and the DOM.
- Class Mixins: Vanilla JS class mixins
- Lit: Perhaps the most popular web-component library
- FAST: Microsoft's new entry into the field
- Haunted: The React hooks API, but web components
- Hybrids: A unique chimera of object-oriented and functional styles
- Gluon: A breath more than vanilla, for the minimalists in the crowd
- Polymer: The original web-components library
Components
<apollo-client>
: Scope a subtree of ApolloElements to a specific client instance<apollo-query>
: Declaratively display GraphQL query data using HTML<apollo-mutation>
: Declaratively add mutations to your app<apollo-subscription>
: Receive real-time updates from HTML
Packages
- Generator: Quickly scaffold a GraphQL app