{"_id":"@ambiten/adapter-graphql","_rev":"3-46d9ae21d43901734e7da2347ab861ed","name":"@ambiten/adapter-graphql","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ambiten/adapter-graphql","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@ambiten/adapter-graphql@1.0.0","maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"homepage":"https://ambiten.dev","bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"dist":{"shasum":"67021dfb6df585e71f063926de2e3423cdc60d7f","tarball":"https://registry.npmjs.org/@ambiten/adapter-graphql/-/adapter-graphql-1.0.0.tgz","fileCount":27,"integrity":"sha512-fkI3Djdn5SfHRSRo0PETbtPumtSbrHfC/k9DRjnpcmkGfA2+4ImKZJl0xz2JfkV7z8GffaVlMp+33t/HXN75fw==","signatures":[{"sig":"MEYCIQCnbM6XRxFppbIHDYT/8KV2Z/gXQJVVx88JmhkDcmiykgIhAMqpBecrzWM6z+giMXmK3Y5dzFQhNGEkGC+Abqr9bYDQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25082},"main":"./dist/index.js","_from":"file:ambiten-adapter-graphql-1.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.11.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"test":"jest --detectOpenHandles --coverage","build":"pnpm -r run build:gql","clean":"rimraf dist","release":"pnpm changeset version","build:gql":"tsc -p tsconfig.json","changeset":"pnpm run changeset"},"_npmUser":{"name":"abimongo","email":"padave805@gmail.com"},"_resolved":"/tmp/545236d47d4dff7957fd6e8804f977fd/ambiten-adapter-graphql-1.0.0.tgz","_integrity":"sha512-fkI3Djdn5SfHRSRo0PETbtPumtSbrHfC/k9DRjnpcmkGfA2+4ImKZJl0xz2JfkV7z8GffaVlMp+33t/HXN75fw==","repository":{"url":"git+https://github.com/AmbitenHQ/ambiten.git","type":"git","directory":"packages/adapter-graphql"},"_npmVersion":"11.17.0","description":"Ambiten adapter for GraphQL","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@ambiten/adapter-types":"1.0.0","@ambiten/adapter-runtime":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.9","typescript":"^5.9.3","@types/jest":"^29.5.14","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter-graphql_1.0.0_1781347257909_0.8513600874841125","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ambiten/adapter-graphql","version":"1.0.1","keywords":[],"author":"","license":"ISC","_id":"@ambiten/adapter-graphql@1.0.1","maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"homepage":"https://docs.ambiten.dev","bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"dist":{"shasum":"e00d9920cd80bf23d1dfb3da56c9471b23f34670","tarball":"https://registry.npmjs.org/@ambiten/adapter-graphql/-/adapter-graphql-1.0.1.tgz","fileCount":27,"integrity":"sha512-yP9DA/+a7YMPJ7CCs+yNB85KnsH4Fq2hG1RMlkytmj+MUGjo8fVH0aXE0eP9oGKEyU6NWzc7F9BOw1kXNXY/2w==","signatures":[{"sig":"MEUCIAz4MSSsxnJeGLYzFQM+z9PIoyn/XQQWnpvEdGIr4+nrAiEAw7m/nvOf7bwbq8hLxkO7ClPac7b6d6xr6eiNIYJdWjY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25094},"main":"./dist/index.js","_from":"file:ambiten-adapter-graphql-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.11.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"scripts":{"test":"jest --detectOpenHandles --coverage","build":"pnpm -r run build:gql","clean":"rimraf dist","release":"pnpm changeset version","build:gql":"tsc -p tsconfig.json","changeset":"pnpm run changeset"},"_npmUser":{"name":"abimongo","email":"padave805@gmail.com"},"_resolved":"/tmp/fadad50a84bff27ba3f59ff4a45b2db3/ambiten-adapter-graphql-1.0.1.tgz","_integrity":"sha512-yP9DA/+a7YMPJ7CCs+yNB85KnsH4Fq2hG1RMlkytmj+MUGjo8fVH0aXE0eP9oGKEyU6NWzc7F9BOw1kXNXY/2w==","repository":{"url":"git+https://github.com/AmbitenHQ/ambiten.git","type":"git","directory":"packages/adapter-graphql"},"_npmVersion":"12.0.2","description":"Ambiten adapter for GraphQL","directories":{},"sideEffects":false,"_nodeVersion":"22.23.2","dependencies":{"@ambiten/adapter-types":"^1.0.0","@ambiten/adapter-runtime":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.4.9","typescript":"^5.9.3","@types/jest":"^29.5.14","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"graphql":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/adapter-graphql_1.0.1_1789148266333_0.24726066934192636","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ambiten/adapter-graphql","version":"1.0.2","description":"Ambiten adapter for GraphQL","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","publishConfig":{"access":"public"},"sideEffects":false,"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}}},"keywords":[],"author":"","license":"ISC","repository":{"type":"git","url":"git+https://github.com/AmbitenHQ/ambiten.git","directory":"packages/adapter-graphql"},"bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"homepage":"https://docs.ambiten.dev","devDependencies":{"@testing-library/jest-dom":"^6.9.1","@types/jest":"^29.5.14","jest":"^29.7.0","ts-jest":"^29.4.9","typescript":"^5.9.3"},"dependencies":{"@ambiten/adapter-runtime":"^1.0.2","@ambiten/adapter-types":"^1.0.1"},"peerDependencies":{"graphql":"^16.0.0"},"engines":{"node":">=20.11.0"},"scripts":{"build:esm":"tsc -b tsconfig.esm.json -force","build:cjs":"tsc -b tsconfig.json -force && node scripts/fix-esm-extensions.mjs","build":"pnpm run clean && pnpm run build:esm && pnpm run build:cjs","test":"jest --detectOpenHandles --coverage","changeset":"pnpm run changeset","clean":"rimraf dist && rimraf ../../.cache/tsbuildinfo/adapter-graphql","release":"pnpm changeset version","postbuild:esm":"node scripts/add-esm-type.js"},"_id":"@ambiten/adapter-graphql@1.0.2","_integrity":"sha512-YZd0/NgoxlvpEeskfLrDOA2xLS9uUN3QEDiVl+uuEkVOXTQMZmHlvPzjRCS4WmHF33JzHgrtInp+Y2U1W2g00w==","_resolved":"/tmp/e7a4171854f81367775ffda996f49d62/ambiten-adapter-graphql-1.0.2.tgz","_from":"file:ambiten-adapter-graphql-1.0.2.tgz","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-YZd0/NgoxlvpEeskfLrDOA2xLS9uUN3QEDiVl+uuEkVOXTQMZmHlvPzjRCS4WmHF33JzHgrtInp+Y2U1W2g00w==","shasum":"536b4785a73dc0f5d0afbee382ca0079782bd58e","tarball":"https://registry.npmjs.org/@ambiten/adapter-graphql/-/adapter-graphql-1.0.2.tgz","fileCount":52,"unpackedSize":42924,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDL/HKvMnh0p1xVVeNXFso6plyDmrHdEpt1IQGOBZnVXgIhAKSKFynXRJpUynBn/Lked9DJ0su/1lEz0ZgNySUKWjOV"}]},"_npmUser":{"name":"abimongo","email":"padave805@gmail.com"},"directories":{},"maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adapter-graphql_1.0.2_1789381801447_0.29112029791680927"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-13T10:40:57.710Z","modified":"2026-09-14T10:30:01.969Z","1.0.0":"2026-06-13T10:40:58.045Z","1.0.1":"2026-09-11T17:37:46.489Z","1.0.2":"2026-09-14T10:30:01.582Z"},"bugs":{"url":"https://github.com/AmbitenHQ/ambiten/issues"},"license":"ISC","homepage":"https://docs.ambiten.dev","keywords":[],"repository":{"type":"git","url":"git+https://github.com/AmbitenHQ/ambiten.git","directory":"packages/adapter-graphql"},"description":"Ambiten adapter for GraphQL","maintainers":[{"name":"abimongo","email":"padave805@gmail.com"}],"readme":"<div style=\"display: flex; align-items: center;\">\n<p >\n  <img\n    src=\"https://raw.githubusercontent.com/AmbitenHQ/ambiten/main/assets/ambiten-mark-192x192.png\"\n    width=\"56\"\n    alt=\"Ambiten\"\n  />  \n</p> <h2> @ambiten/adapter-graphql</h2>\n</div>  \n\n<p align=\"center\">\n  <strong>GraphQL integration for the Ambiten runtime.</strong>\n</p>\n\n<p align=\"center\">\n  Establish context-aware execution boundaries for GraphQL queries, mutations, subscriptions, and resolver pipelines while preserving runtime continuity across the Ambiten ecosystem.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@ambiten/adapter-graphql\">\n    <img src=\"https://img.shields.io/npm/v/@ambiten/adapter-graphql?style=flat-square\" alt=\"npm version\" />\n  </a>\n  <!-- <a href=\"https://ambiten.dev\">\n    <img src=\"https://img.shields.io/badge/docs-ambiten.dev-22c55e?style=flat-square\" alt=\"documentation\" />\n  </a> -->\n    <a href=\"https://github.com/AmbitenHQ/ambiten/stargazers\">\n    <img src=\"https://img.shields.io/github/stars/AmbitenHQ/ambiten?style=flat-square&color=1E88E5\" alt=\"GitHub stars\" />\n  </a>\n</p>\n\n---\n\n## Overview\n\n`@ambiten/adapter-graphql` connects GraphQL execution to the Ambiten runtime.\n\nThe adapter establishes execution boundaries for queries, mutations, and subscriptions so runtime context remains available throughout resolver execution. Tenant information, request metadata, transactions, logging, instrumentation, and runtime services can then participate consistently across GraphQL operations.\n\nThe adapter does not replace GraphQL. It allows GraphQL execution to participate fully in the Ambiten runtime model.\n\n## Installation\n\n```bash\nnpm install @ambiten/adapter-graphql\n```\n\nIf you are starting a new application, installing the core runtime is also recommended:\n\n```bash\nnpm install @ambiten/core @ambiten/adapter-graphql\n```\n\n## Quick Start\n\n```ts\nimport {\n  AmbitenBootstrapFactory\n} from \"@ambiten/core\";\n\nimport {\n  createGraphQLAdapter\n} from \"@ambiten/adapter-graphql\";\n\nconst adapter = createGraphQLAdapter();\n\nconst bootstrap =\n  await AmbitenBootstrapFactory.create({\n    adapter\n  });\n```\n\nOnce installed, GraphQL operations automatically participate in the Ambiten execution model.\n\n## What the Adapter Provides\n\nThe adapter acts as the bridge between GraphQL execution and the runtime.\n\nIt can establish request-scoped context, initialize tenant boundaries, propagate request metadata, participate in transaction-aware execution flows, and expose runtime state to resolvers, services, and models.\n\nThis allows resolver code to remain focused on business logic while execution concerns remain coordinated by the runtime.\n\n## Runtime Flow\n\n```text\nGraphQL Request\n        ↓\nGraphQL Adapter\n        ↓\nAmbitenContext\n        ↓\nResolvers\n        ↓\nModels & Services\n        ↓\nMongoDB\n```\n\nThe adapter creates the execution boundary. The runtime then carries execution state throughout the remainder of the operation lifecycle.\n\n## Resolver Context\n\nGraphQL applications often require execution state to flow across multiple resolver layers.\n\nThe adapter automatically makes runtime context available throughout resolver execution so tenant information, request metadata, transactions, logging, and instrumentation remain consistent regardless of how deeply nested a resolver chain becomes.\n\n```text\nQuery\n  ↓\nResolver\n  ↓\nNested Resolver\n  ↓\nService\n  ↓\nModel\n```\n\nExecution context remains attached throughout the entire flow.\n\n## Multi-Tenancy\n\nWhen multi-tenancy is enabled, tenant information can be resolved during GraphQL execution and made available throughout the active runtime context.\n\n```text\nGraphQL Request\n        ↓\nTenant Resolution\n        ↓\nAmbitenContext\n        ↓\nTenant-Aware Execution\n```\n\nThis allows models and services to operate against the correct tenant boundary without manually passing tenant identifiers between resolvers.\n\n## Subscriptions\n\nThe adapter also supports runtime-aware subscription execution.\n\nSubscription events can participate in the same execution model used by queries and mutations, allowing tenant information, instrumentation, logging, and runtime metadata to remain consistent across real-time GraphQL workflows.\n\n## Documentation\n\nComplete documentation is available at:\n\nhttps://docs.ambiten.dev\n\n## Related Packages\n\n* `@ambiten/core`\n* `@ambiten/logger`\n* `@ambiten/create`\n\n## License\n\nMIT\n","readmeFilename":"README.md"}