{"id":20942175,"url":"https://github.com/getstation/apollo-link-reactive-schema","last_synced_at":"2025-05-13T23:32:32.776Z","repository":{"id":57182328,"uuid":"166493507","full_name":"getstation/apollo-link-reactive-schema","owner":"getstation","description":"Apollo Link that provides a reactive-graphql execution environment to perform operations on a provided reactive schema","archived":false,"fork":false,"pushed_at":"2019-10-11T17:08:42.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T10:32:16.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getstation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-19T01:29:26.000Z","updated_at":"2022-04-14T11:24:22.000Z","dependencies_parsed_at":"2022-09-12T00:00:19.732Z","dependency_job_id":null,"html_url":"https://github.com/getstation/apollo-link-reactive-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getstation%2Fapollo-link-reactive-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getstation%2Fapollo-link-reactive-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getstation%2Fapollo-link-reactive-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getstation%2Fapollo-link-reactive-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getstation","download_url":"https://codeload.github.com/getstation/apollo-link-reactive-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043217,"owners_count":22004912,"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":[],"created_at":"2024-11-18T23:23:58.272Z","updated_at":"2025-05-13T23:32:27.749Z","avatar_url":"https://github.com/getstation.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apollo-link-reactive-schema\r\n[![npm version](https://badge.fury.io/js/apollo-link-reactive-schema.svg)](https://badge.fury.io/js/apollo-link-reactive-schema)\r\n\r\n\u003e Apollo Link that provides a [reactive-graphql execution environment](https://github.com/mesosphere/reactive-graphql) to perform operations on a provided reactive schema.\r\n\r\n## Installation\r\n\r\n`npm install apollo-link-reactive-schema --save`\r\n\r\n## Usage\r\n\r\n```js\r\nimport { ApolloClient } from 'apollo-client';\r\nimport { from } from 'rxjs';\r\nimport { InMemoryCache } from 'apollo-cache-inmemory';\r\nimport { ReactiveSchemaLink } from 'apollo-link-reactive-schema';\r\nimport { gql } from 'graphql-tag';\r\n\r\nimport schema from './path/to/your/schema';\r\n\r\nconst graphqlClient = new ApolloClient({\r\n  cache: new InMemoryCache(),\r\n  link: new ReactiveSchemaLink({ schema }),\r\n});\r\n\r\nconst query = gql`\r\n  # don't forget the @live directive, otherwise you'll experience\r\n  # difficulties with subscription\u003eunsubscription\u003esubscription\r\n  query @live {\r\n    someReactiveField\r\n  }\r\n`;\r\n\r\nconst $res = graphqlClient.watchQuery({ query });\r\n$res.subscribe(res =\u003e console.log(res));\r\n```\r\n\r\n### Options\r\n\r\nThe `ReactiveSchemaLink` constructor can be called with an object with the following properties:\r\n\r\n* `schema`: an executable graphql schema\r\n* `context`: an object passed to the resolvers, following the [graphql specification](http://graphql.org/learn/execution/#root-fields-resolvers) or a function that accepts the operation and returns the resolver context.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetstation%2Fapollo-link-reactive-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetstation%2Fapollo-link-reactive-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetstation%2Fapollo-link-reactive-schema/lists"}