{"id":15554950,"url":"https://github.com/zendesk/laika","last_synced_at":"2025-05-16T02:04:02.578Z","repository":{"id":37598709,"uuid":"419067353","full_name":"zendesk/laika","owner":"zendesk","description":"Log, test, intercept and modify Apollo Client's operations","archived":false,"fork":false,"pushed_at":"2025-04-16T15:37:30.000Z","size":13060,"stargazers_count":122,"open_issues_count":8,"forks_count":8,"subscribers_count":81,"default_branch":"main","last_synced_at":"2025-05-14T09:49:33.638Z","etag":null,"topics":["apollo","apollo-client","apollo-link","graphql","mock","mocking","test","testing","testing-tools","utility"],"latest_commit_sha":null,"homepage":"https://zendesk.github.io/laika","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zendesk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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}},"created_at":"2021-10-19T19:38:18.000Z","updated_at":"2025-04-23T23:37:44.000Z","dependencies_parsed_at":"2024-06-21T03:54:28.133Z","dependency_job_id":"ee19dc2a-348b-43e9-bafc-21e6330a8635","html_url":"https://github.com/zendesk/laika","commit_stats":null,"previous_names":["zendesk/apollo-testing-toolkit-link"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Flaika","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Flaika/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Flaika/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Flaika/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zendesk","download_url":"https://codeload.github.com/zendesk/laika/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453646,"owners_count":22073616,"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","apollo-client","apollo-link","graphql","mock","mocking","test","testing","testing-tools","utility"],"created_at":"2024-10-02T15:05:16.924Z","updated_at":"2025-05-16T02:04:02.532Z","avatar_url":"https://github.com/zendesk.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![Laika logo](./media/logo-laika-bg.png)\n\n[![Try Laika on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/laika-example-3yyq0?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\n\nTest, mock, intercept and modify Apollo Client's operations — in both browser and unit tests!\n\nRead the Medium article about Laika: [Mock GraphQL Subscriptions with Laika — the only Apollo Client mocking tool you’ll need](https://medium.com/zendesk-engineering/mock-graphql-operations-with-laika-the-only-apollo-client-mocking-tool-youll-need-c116e1f62128)\n\n![Example recording output](./media/example-recording.png)\n\n## Features\n\n- **mock** responses in either unit tests or browser tests (think Puppeteer or Cypress)\n  - simulate error state\n  - simulate loading state\n  - simulate subscriptions (pushing data to the client at any given point)\n- it can work in production code without affecting the size of the bundle (laika is lazily loaded)\n- captures the variables that were called for a given operation for assertions\n- **log** all the data passing through from the network (or whatever Links are after this one)\n- **record** your user story\n- **generate fixtures and working mock code** for use in your tests\n- **modify** backend responses before they reach your components (e.g. to fuzz-test unexpected behavior)\n\n## Usage\n\n- [How to install](https://zendesk.github.io/laika/docs/how-to-install)\n- [Usage in Cypress](https://zendesk.github.io/laika/docs/usage-in-cypress)\n- [Logging and recording](https://zendesk.github.io/laika/docs/logging-and-recording)\n- [Pitfalls](https://zendesk.github.io/laika/docs/pitfalls)\n- [API reference](https://zendesk.github.io/laika/docs/modules/Laika)\n\n## Alternatives\n\n- [`MockedProvider`](https://www.apollographql.com/docs/react/development-testing/testing/) - the official Apollo mocking tool designed for unit tests; offers no subscription mocking or recording functionality\n\n## Contribution\n\nThanks for your interest in our tool! Community involvement helps make our\ndesign system fresh and tasty for everyone.\n\nGot issues with what you find here? Please feel free to create an\n[issue](https://github.com/zendesk/laika/issues/new).\n\nIf you'd like to take a crack at making some changes, please follow our\n[contributing](https://github.com/zendesk/laika/blob/main/.github/CONTRIBUTING.md) documentation for details\nneeded to submit a PR.\n\nCommunity behavior is benevolently ruled by a [code of\nconduct](https://github.com/zendesk/laika/blob/main/.github/CODE_OF_CONDUCT.md). Please participate accordingly.\n\n## License\n\nCopyright 2021 Zendesk\n\nLicensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Flaika","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzendesk%2Flaika","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Flaika/lists"}