0.5.0 • Published 3 years ago

knockout-apollo v0.5.0

Weekly downloads
5
License
MIT
Repository
-
Last release
3 years ago

knockout-apollo

A knockoutjs extension to connect to a GraphQL endpoint through an ApolloClient instance

Approach

  • A thin wrapper around an instance of the ApolloClient class for GraphQL queries, mutations and subscriptions
  • Utilises the structure and loading features of ko.plus for queries and mutations

How it works

Attaches additional methods to Observables/Observable Arrays via a Custom Function. This library is strongly influenced by Vue-Apollo v1.

Requirements

Documentation

Index

Demo

To run a demo in localhost open a terminal and:

  • git clone https://github.com/AntonyThorpe/knockout-apollo.git.
  • And cd knockout-apollo and type npm install.
  • Then npm run test (we use Meteor Tests as a server for the demo)
  • To update any of the demo files open a new terminal and npm run watch to save changes to dist/demo.js.
  • Once Meteor is up and running open a third terminal, cd to the project root and npm run demo to open in Firefox.

Tests

In the terminal cd to the tests folder and meteor test --driver-package=practicalmeteor:mocha --port 3002. Or, from project root, npm run tests.

Creating a knockout-apollo min bundle

  • Then npm run build

Contributions

Pull requests are most welcome!

Support

None sorry.

Change Log

File

Licence

MIT

Links

0.5.0

3 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago