{"id":13452513,"url":"https://github.com/apollographql/apollo-link-rest","last_synced_at":"2026-03-01T12:02:21.964Z","repository":{"id":41469366,"uuid":"112213284","full_name":"apollographql/apollo-link-rest","owner":"apollographql","description":"Use existing REST endpoints with GraphQL","archived":false,"fork":false,"pushed_at":"2026-02-13T12:21:45.000Z","size":720,"stargazers_count":791,"open_issues_count":41,"forks_count":120,"subscribers_count":41,"default_branch":"master","last_synced_at":"2026-02-13T21:28:42.468Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apollographql.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-11-27T15:26:14.000Z","updated_at":"2026-01-06T00:29:21.000Z","dependencies_parsed_at":"2023-10-19T20:39:27.383Z","dependency_job_id":"3e47793e-cee8-47e6-90ea-96ddf5ad5af1","html_url":"https://github.com/apollographql/apollo-link-rest","commit_stats":{"total_commits":334,"total_committers":58,"mean_commits":5.758620689655173,"dds":0.5898203592814371,"last_synced_commit":"bd0e244b9826e8e9053296e87bbb081a4b4cd394"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/apollographql/apollo-link-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fapollo-link-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fapollo-link-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fapollo-link-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fapollo-link-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apollographql","download_url":"https://codeload.github.com/apollographql/apollo-link-rest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apollographql%2Fapollo-link-rest/sbom","scorecard":{"id":203064,"data":{"date":"2025-08-11","repo":{"name":"github.com/apollographql/apollo-link-rest","commit":"bd0e244b9826e8e9053296e87bbb081a4b4cd394"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":1,"reason":"0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":5,"reason":"Found 6/12 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/apollographql/.github/SECURITY.md:1","Info: Found linked content: github.com/apollographql/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/apollographql/.github/SECURITY.md:1","Info: Found text in security policy: github.com/apollographql/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T23:09:07.864Z","repository_id":41469366,"created_at":"2025-08-16T23:09:07.864Z","updated_at":"2025-08-16T23:09:07.864Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T11:43:06.159Z","status":"ssl_error","status_checked_at":"2026-03-01T11:43:03.887Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07-31T07:01:26.230Z","updated_at":"2026-03-01T12:02:21.912Z","avatar_url":"https://github.com/apollographql.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Libraries"],"sub_categories":["Official Apollo Libraries"],"readme":"---\ntitle: REST Link\n---\n\n## ⚠️ This library is under active development ⚠️\n\n\u003e The [Apollo Link Rest](https://github.com/apollographql/apollo-link-rest) library is maintained by Apollo community members and not an Apollo GraphQL maintained library. For information on progress check out [the issues](https://github.com/apollographql/apollo-link-rest/issues) or [the design](./designs/initial.md). We would love your help with writing docs, testing, anything! We would love for you, yes you, to be a part of the Apollo community!\n\n## Purpose\nAn Apollo Link to easily try out GraphQL without a full server. It can be used to prototype, with third-party services that don't have a GraphQL endpoint or in a transition from REST to GraphQL.\n\n## Installation\n\n```bash\nnpm install apollo-link-rest @apollo/client graphql qs --save\nor\nyarn add apollo-link-rest @apollo/client graphql qs\n```\n\n`@apollo/client`, `graphql`, and `qs` are peer dependencies needed by `apollo-link-rest`.\n\n## Usage\n\n### Basics\n\n```js\nimport { RestLink } from \"apollo-link-rest\";\n// Other necessary imports...\n\n// Create a RestLink for the REST API\n// If you are using multiple link types, restLink should go before httpLink,\n// as httpLink will swallow any calls that should be routed through rest!\nconst restLink = new RestLink({\n  uri: 'https://swapi.co/api/',\n});\n\n// Configure the ApolloClient with the default cache and RestLink\nconst client = new ApolloClient({\n  link: restLink,\n  cache: new InMemoryCache(),\n});\n\n// A simple query to retrieve data about the first person\nconst query = gql`\n  query luke {\n    person @rest(type: \"Person\", path: \"people/1/\") {\n      name\n    }\n  }\n`;\n\n// Invoke the query and log the person's name\nclient.query({ query }).then(response =\u003e {\n  console.log(response.data.person.name);\n});\n```\n\n[![Edit Basic Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/apollographql/apollo-link-rest/tree/master/examples/simple)\n\n### Apollo Client \u0026 React Apollo\n\nFor an example of using REST Link with Apollo Client and React Apollo view this CodeSandbox:\n\n[![Edit Advanced Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/apollographql/apollo-link-rest/tree/master/examples/advanced)\n\n### TypeScript\n\nFor an example of using REST Link with Apollo Client, React Apollo and TypeScript view this CodeSandbox:\n\n[![Edit TypeScript Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/apollographql/apollo-link-rest/tree/master/examples/typescript)\n\n## Options\n\nREST Link takes an object with some options on it to customize the behavior of the link. The options you can pass are outlined below:\n\n- `uri`: the URI key is a string endpoint (optional when `endpoints` provides a default)\n- `endpoints`: root endpoint (uri) to apply paths to or a map of endpoints\n- `customFetch`: a custom `fetch` to handle REST calls\n- `headers`: an object representing values to be sent as headers on the request\n- `credentials`: a string representing the credentials policy you want for the fetch call\n- `fieldNameNormalizer`: function that takes the response field name and converts it into a GraphQL compliant name\n\n## Context\n\nREST Link uses the `headers` field on the context to allow passing headers to the HTTP request. It also supports the `credentials` field for defining credentials policy.\n\n- `headers`: an object representing values to be sent as headers on the request\n- `credentials`: a string representing the credentials policy you want for the fetch call\n\n## Documentation\n\nFor a complete `apollo-link-rest` reference visit the documentation website at: https://www.apollographql.com/docs/link/links/rest.html\n\n## Contributing\n\nThis project uses TypeScript to bring static types to JavaScript and uses Jest for testing. To get started, clone the repo and run the following commands:\n\n```bash\nnpm install # or `yarn`\n\nnpm test # or `yarn test` to run tests\nnpm test -- --watch # run tests in watch mode\n\nnpm run check-types # or `yarn check-types` to check TypeScript types\n```\n\nTo run the library locally in another project, you can do the following:\n\n```bash\nnpm link\n\n# in the project you want to run this in\nnpm link apollo-link-rest\n```\n\n## Related Libraries\n\n- [JSON API Link](https://github.com/Rsullivan00/apollo-link-json-api/) provides\ntooling for using GraphQL with JSON API compliant APIs.\n- [apollo-type-patcher](https://github.com/mpgon/apollo-type-patcher) declarative type definitions for your REST API with zero dependencies. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollographql%2Fapollo-link-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapollographql%2Fapollo-link-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollographql%2Fapollo-link-rest/lists"}