apollo-link-computed-property
This project is under heavy active development !!
Introduction
Apollo link for @computed
directive support on client side.
Check this directive for the server side.
Table of Contents
Installation
yarn add apollo-link-computed-property
This package requires apollo-client as peer dependency
Usage
const httpLink = ; const client = cache: link: ApolloLink;
Query:
client;
Directive Parameters
Directive params:
value
: String
The computed value. It can contain fields defined within the current type.
Remember to add prefix with the name of query root level
Example:
@computed(value: "$me.firstName $me.lastName")
@computed(value: "$product.price $")
Contributing
I would love to see your contribution. ❤️
For local development (and testing), all you have to do is to run yarn
and then run server yarn start:server
and client yarn start:client
.
That will start the Apollo server with client and you are ready to contribute 🎉
Run yarn test (try --watch
flag) for unit tests (we are using Jest)
TODO:
- Add types
- Support for computing nested fields
- Support fragments
LICENSE
The MIT License (MIT) 2018 - Luke Czyszczonik - mailto:lukasz.czyszczonik@gmail.com