{"id":16482629,"url":"https://github.com/mfix22/apollo-transform-utils","last_synced_at":"2026-04-29T10:33:53.129Z","repository":{"id":57182409,"uuid":"135476380","full_name":"mfix22/apollo-transform-utils","owner":"mfix22","description":"Utility transforms to be used as `graphql-tools` transforms","archived":false,"fork":false,"pushed_at":"2018-08-29T17:00:20.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-20T18:13:44.658Z","etag":null,"topics":["apollo","document","graphql","transform","utils"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/apollo-transform-utils","language":"JavaScript","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/mfix22.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":"2018-05-30T17:30:15.000Z","updated_at":"2019-09-26T17:11:04.000Z","dependencies_parsed_at":"2022-09-14T04:41:33.204Z","dependency_job_id":null,"html_url":"https://github.com/mfix22/apollo-transform-utils","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mfix22/apollo-transform-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Fapollo-transform-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Fapollo-transform-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Fapollo-transform-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Fapollo-transform-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfix22","download_url":"https://codeload.github.com/mfix22/apollo-transform-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfix22%2Fapollo-transform-utils/sbom","scorecard":{"id":638819,"data":{"date":"2025-08-11","repo":{"name":"github.com/mfix22/apollo-transform-utils","commit":"d13450c77c0484410da7696d3fed3ab0207d0d7d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/11 approved changesets -- score normalized to 0","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":"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 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-21T10:04:57.161Z","repository_id":57182409,"created_at":"2025-08-21T10:04:57.161Z","updated_at":"2025-08-21T10:04:57.161Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32421929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"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":["apollo","document","graphql","transform","utils"],"created_at":"2024-10-11T13:11:29.198Z","updated_at":"2026-04-29T10:33:53.112Z","avatar_url":"https://github.com/mfix22.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `apollo-transform-utils`\n\u003e Utility transforms to be used as [`graphql-tools` transforms](https://www.apollographql.com/docs/graphql-tools/schema-transforms#Transform)\n\n## Getting Started\nInstall `apollo-transform-utils` with\n```sh\n$ npm i apollo-transform-utils\n```\nor\n```sh\n$ yarn add apollo-transform-utils\n```\nand use them within your `delegateToSchema` resolvers:\n```js\nconst { Debug, PickTransform, InlineFragmentTransform, NestTransform } = require('apollo-transform-utils')\n\nconst transforms = [\n  new PickTransform(fieldName),\n  new InlineFragmentTransform('ContactInfo')\n  new NestTransform(`${fieldName}.user.info`),\n  new Debug()\n]\n\n// within resolver\nreturn info.mergeInfo\n    .delegateToSchema({\n      schema: info.schema,\n      operation: info.operation.operation,\n      fieldName,\n      args,\n      context,\n      info,\n      transforms\n    })\n```\n\n## Usage\n\n### `NestTransform(path: string)`\nPlace your current selection set under a specified period-delimited path\n##### Example\n```js\nconst { NestTransform } = require('apollo-transform-utils')\n\nconst path = 'user.contactInfo'\n\nconst transforms = [\n  new NestTransform(path)\n]\n\n/*\n * { number } -\u003e { user { contactInfo { number } } }\n */\n```\n\n### `PickTransform(path: string)`\nOpposite of `NestTransform`. Select selections along a period-delimited path.\n##### Example\n```js\nconst { PickTransform } = require('apollo-transform-utils')\n\nconst path = 'user.contactInfo'\n\nconst transforms = [\n  new PickTransform(path)\n]\n\n/*\n * { user { contactInfo { number } } } -\u003e { number }\n */\n```\n\n### `InlineFragmentTransform(typeName: string)`\nNest your currently selection under a inline fragment of type `typeName`\n\n##### Example\n```js\nconst { InlineFragmentTransform } = require('apollo-transform-utils')\n\nconst typeName = 'User'\n\nconst transforms = [\n  new InlineFragmentTransform(typeName)\n]\n\n/*\n * { id } -\u003e { ... on User { id } }\n */\n```\n\n### `DocumentTransform(query: string | Document)`\nCreates a new document and replaces the string `__SELECTIONS__` with your current selection set.\n\n##### Example\n```js\nconst { DocumentTransform } = require('apollo-transform-utils')\n\nconst newDocument = `\n  query {\n    user {\n      friends {\n        ${DocumentTransform.__SELECTIONS__}\n      }\n    }\n  }\n`\n\nconst transforms = new DocumentTransform(newDocument)\n\n/*\n * { id } -\u003e { user { friends { id } } }\n */\n```\n### `Debug`\nTransform that pretty prints the current operation's document and variables. Super helpful for determining intermediate results between transforms.\n##### Example\n```js\nconst { Debug, PickTransform, InlineFragmentTransform, NestTransform } = require('apollo-transform-utils')\n\nconst transforms = [\n  new Debug(),\n    new PickTransform(fieldName),\n  new Debug(),\n    new InlineFragmentTransform('ContactInfo')\n  new Debug(),\n    new NestTransform(`${fieldName}.user.info`),\n  new Debug()\n]\n```\n\n\n### Utilities\n#### `nest(path: string, selections: Array\u003cFieldNode\u003e)`\nUsed by `NestTransform`, but can be used as a standalone function to nest selections under a certain path.\n\n#### `pick(path: string, selections: Array\u003cFieldNode\u003e)`\nUsed by `PickTransform`, but can be used as a standalone function to pick a node along the path from a selection set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfix22%2Fapollo-transform-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfix22%2Fapollo-transform-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfix22%2Fapollo-transform-utils/lists"}