{"id":16485746,"url":"https://github.com/czystyl/apollo-link-computed-property","last_synced_at":"2025-10-19T11:45:23.451Z","repository":{"id":57182313,"uuid":"130051277","full_name":"czystyl/apollo-link-computed-property","owner":"czystyl","description":"Apollo link for computed property directive for client side","archived":false,"fork":false,"pushed_at":"2018-05-02T21:18:58.000Z","size":91,"stargazers_count":20,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T06:01:15.638Z","etag":null,"topics":["apollo-link","computed-properties","graphql"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/czystyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-18T11:21:48.000Z","updated_at":"2024-03-29T04:07:21.000Z","dependencies_parsed_at":"2022-09-14T06:01:47.178Z","dependency_job_id":null,"html_url":"https://github.com/czystyl/apollo-link-computed-property","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czystyl%2Fapollo-link-computed-property","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czystyl%2Fapollo-link-computed-property/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czystyl%2Fapollo-link-computed-property/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czystyl%2Fapollo-link-computed-property/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/czystyl","download_url":"https://codeload.github.com/czystyl/apollo-link-computed-property/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244297871,"owners_count":20430347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apollo-link","computed-properties","graphql"],"created_at":"2024-10-11T13:27:01.750Z","updated_at":"2025-10-19T11:45:18.413Z","avatar_url":"https://github.com/czystyl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apollo-link-computed-property\n\n## This project is under heavy active development !!\n\n[![Version][version-badge]][package]\n[![downloads][downloads-badge]][npmtrends]\n[![PRs Welcome][prs-badge]][prs]\n[![MIT License][license-badge]][build]\n\n## Introduction\n\nApollo link for `@computed` directive support on client side.\n\n\u003e Check this directive for the [server](https://github.com/czystyl/apollo-link-computed-property) side.\n\n# Table of Contents\n\n* [Introduction](#introduction)\n* [Installation](#installation)\n* [Usage](#Usage)\n* [Parameters](#parameters)\n* [Contributing](#contributing)\n* [TODO](#todo)\n* [LICENSE](#license)\n\n# Installation\n\n```\nyarn add apollo-link-computed-property\n```\n\n_This package requires [apollo-client](https://www.npmjs.com/package/apollo-client) as peer dependency_\n\n# Usage\n\n```js\nconst httpLink = createHttpLink({ uri: 'http://you-graphql-server/graphql' });\n\nconst client = new ApolloClient({\n  cache: new InMemoryCache(),\n  link: ApolloLink.from([ComputedPropertyLink, httpLink]),\n});\n```\n\nQuery:\n\n```js\nclient.query({\n  query: gql`\n    {\n      me {\n        firstName\n        lastName\n        fullName @computed(value: \"$me.firstName $me.lastName\")\n      }\n    }\n  `,\n});\n```\n\n# Directive Parameters\n\nDirective params:\n\n### `value`: String\n\nThe computed value. It can contain fields defined within the current type.\n\n\u003e Remember to add prefix with the name of query root level\n\nExample:\n\n`@computed(value: \"$me.firstName $me.lastName\")`\n`@computed(value: \"$product.price $\")`\n\n## Contributing\n\nI would love to see your contribution. ❤️\n\nFor 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`.\nThat will start the Apollo server with client and you are ready to contribute :tada:\n\nRun yarn test (try `--watch` flag) for unit tests (we are using Jest)\n\n## TODO:\n\n* [ ] Add types\n* [x] Support for computing nested fields\n* [ ] Support fragments\n\n# LICENSE\n\nThe MIT License (MIT) 2018 - Luke Czyszczonik - \u003cmailto:lukasz.czyszczonik@gmail.com\u003e\n\n[npm]: https://www.npmjs.com/\n[node]: https://nodejs.org\n[build-badge]: https://img.shields.io/travis/czystyl/apollo-link-computed-property.svg?style=flat-square\n[build]: https://travis-ci.org/graphql-community/graphql-directive-computed-property\n[coverage-badge]: https://img.shields.io/codecov/c/github/graphql-community/graphql-directive-computed-property.svg?style=flat-square\n[coverage]: https://codecov.io/github/czystyl/apollo-link-computed-property\n[version-badge]: https://img.shields.io/npm/v/graphql-directive-computed-property.svg?style=flat-square\n[package]: https://www.npmjs.com/package/graphql-directive-computed-property\n[downloads-badge]: https://img.shields.io/npm/dm/graphql-directive-computed-property.svg?style=flat-square\n[npmtrends]: http://www.npmtrends.com/graphql-directive-computed-property\n[license-badge]: https://img.shields.io/npm/l/graphql-directive-computed-property.svg?style=flat-square\n[license]: https://github.com/czystyl/apollo-link-computed-property/blob/master/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[donate-badge]: https://img.shields.io/badge/$-support-green.svg?style=flat-square\n[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square\n[coc]: https://github.com/czystyl/apollo-link-computed-property/blob/master/CODE_OF_CONDUCT.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczystyl%2Fapollo-link-computed-property","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fczystyl%2Fapollo-link-computed-property","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczystyl%2Fapollo-link-computed-property/lists"}