{"id":26011432,"url":"https://github.com/hamidyfine/jest-graphql-transformer","last_synced_at":"2026-02-23T23:12:38.392Z","repository":{"id":279957455,"uuid":"940577885","full_name":"hamidyfine/jest-graphql-transformer","owner":"hamidyfine","description":"A Jest transformer for importing GraphQL queries from separate files, similar to the graphql-tag loader for Webpack.","archived":false,"fork":false,"pushed_at":"2025-03-01T17:02:48.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T23:18:54.937Z","etag":null,"topics":["graphql","jest","jest-transform","jest-transformer","translation"],"latest_commit_sha":null,"homepage":"https://www.apollographql.com/docs/react/integrations/webpack#jest","language":null,"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/hamidyfine.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-28T12:27:24.000Z","updated_at":"2025-10-12T08:38:54.000Z","dependencies_parsed_at":"2025-02-28T18:34:17.243Z","dependency_job_id":"719bf793-905d-4b9c-989f-03438f94c930","html_url":"https://github.com/hamidyfine/jest-graphql-transformer","commit_stats":null,"previous_names":["hamidyfine/jest-transform-graphql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hamidyfine/jest-graphql-transformer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidyfine%2Fjest-graphql-transformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidyfine%2Fjest-graphql-transformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidyfine%2Fjest-graphql-transformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidyfine%2Fjest-graphql-transformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamidyfine","download_url":"https://codeload.github.com/hamidyfine/jest-graphql-transformer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidyfine%2Fjest-graphql-transformer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29760166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T21:02:23.375Z","status":"ssl_error","status_checked_at":"2026-02-23T20:58:31.539Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["graphql","jest","jest-transform","jest-transformer","translation"],"created_at":"2025-03-05T23:19:43.255Z","updated_at":"2026-02-23T23:12:38.359Z","avatar_url":"https://github.com/hamidyfine.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-graphql-transformer\n\nA Jest transformer that allows GraphQL queries in separate files, similar to the `graphql-tag` loader for Webpack, but adapted for Jest, which does not support Webpack loaders. This package provides the same transformation within Jest, enabling seamless GraphQL query imports.\n\n---\n\n## 🚀 Installation\n\nInstall the package using **npm** or **yarn**:\n\n```sh\nnpm install --save-dev jest-graphql-transformer\n```\n\nor\n\n```sh\nyarn add --dev jest-graphql-transformer\n```\n\n---\n\n## 🔧 Usage\n\n### ✅ Configure Jest to Use the Transformer\n\n#### 📌 **In `package.json`**\n\nAdd the following to your Jest configuration:\n\n```json\n\"jest\": {\n  \"transform\": {\n    \"\\\\.(gql|graphql)$\": \"jest-graphql-transformer\",\n    \".*\": \"babel-jest\"\n  }\n}\n```\n\n#### 📌 **Or in `jest.config.js` / `jest.config.ts`**\n\n```javascript\nexport default {\n  transform: {\n    '\\\\.(gql|graphql)$': 'jest-graphql-transformer',\n  },\n};\n```\n\n### ⚠️ **Note:**\n\nOnce you define the `transform` property, **Jest's default transformations will be overridden**.\nIf you need Babel for other files, make sure to include it:\n\n```javascript\nexport default {\n  transform: {\n    '\\\\.(gql|graphql)$': 'jest-graphql-transformer',\n    '.*': 'babel-jest', // Keep Babel for other files\n  },\n};\n```\n\n---\n\n## 📜 License\n\nMIT License © 2024 [hamidyfine](https://github.com/hamidyfine)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidyfine%2Fjest-graphql-transformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamidyfine%2Fjest-graphql-transformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidyfine%2Fjest-graphql-transformer/lists"}