@apollo-elements/polymer
π Read the Full API Docsπ
π Contents
π§ Installation
apollo-elements
are distributed through npm
the node package manager. To install a copy of the latest version of these elements in your project's node_modules
directory, first Install npm on your system, then run the following command in your project's root directory:
npm install --save @apollo-elements/polymer
@apollo-elements/polymer
does not depend on @polymer/polymer
. The components extend directly from HTMLElement, so they're suitable for use in any project, not just Polymer library apps.
π©βπ Usage
See our docs on setting up Apollo client so your components can fetch their data.
Import the elements.
import '@apollo-elements/polymer/polymer-apollo-query';
import '@apollo-elements/polymer/polymer-apollo-mutation';
You can now use them in your polymer template:
<polymer-apollo-query
data="{{data}}"
variables="[[variables]]"
query="[[UserQuery]]"
></polymer-apollo-query>
<paper-icon-item>
<iron-image slot="item-icon">[[data.user.picture]]</iron-image>
[[data.user.name]]
</paper-icon-item>
π Other Libraries
Looking for other libraries? Want to use Apollo with vanilla extends HTMLElement
components? Check out our docs site
π·ββοΈ Maintainers
apollo-elements
is a community project maintained by Benny Powers.