{"_id":"@by-association-only/graphql-app-config","_rev":"6-46d74ce0cbe6c76efffe8d7c556af703","name":"@by-association-only/graphql-app-config","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.0":{"name":"@by-association-only/graphql-app-config","version":"1.0.0","license":"MIT","_id":"@by-association-only/graphql-app-config@1.0.0","maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","bugs":{"url":"https://github.com/baoagency/shopify-apps/issues"},"dist":{"shasum":"f0dce028125b3364b7203aec62355d0f9ef7e508","tarball":"https://registry.npmjs.org/@by-association-only/graphql-app-config/-/graphql-app-config-1.0.0.tgz","fileCount":3,"integrity":"sha512-irRQTs3NkE/P+FVsqFFBEiI22zOKqVRPIVg33TxQrOkTULK2nTSq8qGaTEVS2k9WwUuVnE6qR+uwqhk99+6YTA==","signatures":[{"sig":"MEQCIGybiEyKsPm5ZSH8ru67NmqUds7dWPskags5ZLJtRqGKAiBnX5wL1JcnMLpJ2nleDjBSx9kQ39wAshCi4JRlJINvyw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8654},"type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"gitHead":"d006c5f84d10597a4024ef593324254bcf975efb","scripts":{"type-check":"tsc --noEmit"},"_npmUser":{"name":"dangamble","email":"dan@bao.agency"},"repository":{"url":"git+https://github.com/baoagency/shopify-apps.git","type":"git"},"_npmVersion":"10.9.2","description":"BAO's Shopify App helpers","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"graphql":"^16.9.0","graphql-config":"^5.1.5","@graphql-codegen/cli":"^6.0.1","@shopify/graphql-codegen":"^0.1.0","@shopify/api-codegen-preset":"^1.2.0","@graphql-codegen/plugin-helpers":"^6.0.0"},"peerDependencies":{"graphql":">=15.0.0","typescript":">=4.5.0","graphql-config":">=5.0.0","@graphql-codegen/cli":">=5.0.0","@shopify/graphql-codegen":">=0.1.0","@shopify/api-codegen-preset":">=1.0.0","@graphql-codegen/plugin-helpers":">=5.0.0"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/graphql-app-config_1.0.0_1761332494244_0.1336774971261281","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@by-association-only/graphql-app-config","version":"1.1.0","license":"MIT","_id":"@by-association-only/graphql-app-config@1.1.0","maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","bugs":{"url":"https://github.com/baoagency/shopify-apps/issues"},"dist":{"shasum":"d2f4f556fe2927abe810af1342c44be2031b618f","tarball":"https://registry.npmjs.org/@by-association-only/graphql-app-config/-/graphql-app-config-1.1.0.tgz","fileCount":6,"integrity":"sha512-KtfKrlrUc0Wq27E3Pum0RqBXCgBvZUWWqPepWj6ZnF5AdKq+CvTvSqc3NhBwxa445SNvuVPB3GLY63DvyaznvQ==","signatures":[{"sig":"MEYCIQDZvEvjZO7dd9paveLzEicLkj4vKu7WnTrXIO2Qk7/3OAIhAK0wliCMHif3ObsN09zyWDyMNDtDdul+QI1GEQ8rUpDo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31041},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"cbf1d9bee1b452457a4aef00081de271f069ecd1","scripts":{"type-check":"tsc --noEmit"},"_npmUser":{"name":"dangamble","email":"dan@bao.agency"},"repository":{"url":"git+https://github.com/baoagency/shopify-apps.git","type":"git"},"_npmVersion":"10.9.2","description":"BAO's Shopify App helpers","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"graphql":"^16.9.0","graphql-config":"^5.1.5","@graphql-codegen/cli":"^6.0.1","@shopify/graphql-codegen":"^0.1.0","@shopify/api-codegen-preset":"^1.2.0","@graphql-codegen/plugin-helpers":"^6.0.0"},"peerDependencies":{"graphql":">=15.0.0","typescript":">=4.5.0","graphql-config":">=5.0.0","@graphql-codegen/cli":">=5.0.0","@shopify/graphql-codegen":">=0.1.0","@shopify/api-codegen-preset":">=1.0.0","@graphql-codegen/plugin-helpers":">=5.0.0"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/graphql-app-config_1.1.0_1761560628916_0.20904800776438637","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@by-association-only/graphql-app-config","version":"1.2.0","license":"MIT","_id":"@by-association-only/graphql-app-config@1.2.0","maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","bugs":{"url":"https://github.com/baoagency/shopify-apps/issues"},"dist":{"shasum":"9c674bec50bb9051549a7425cb901bd6b77fa67d","tarball":"https://registry.npmjs.org/@by-association-only/graphql-app-config/-/graphql-app-config-1.2.0.tgz","fileCount":6,"integrity":"sha512-r50JQy3rFJl/8101TNo8k14DLpFz9ZQ3U7FCanY3+V+DQBfwyWXDNvV18zYqbqx7fcJciTEBb8ROzX0/hbtEaQ==","signatures":[{"sig":"MEUCIC4jnZu2CRbFt36j0q62NqxwkXuxGUk+O6wAkbn8xLuQAiEA0X4y9RwfXgS0zGL91z6dcixl/Rq51+uFCNpDO/bvD8g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33412},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"87d325695b86c3cdce62b0aaa87e042a03686b04","scripts":{"type-check":"tsc --noEmit"},"_npmUser":{"name":"dangamble","email":"dan@bao.agency"},"repository":{"url":"git+https://github.com/baoagency/shopify-apps.git","type":"git"},"_npmVersion":"10.9.2","description":"BAO's Shopify App helpers","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"graphql":"^16.9.0","graphql-config":"^5.1.5","@graphql-codegen/cli":"^6.0.1","@shopify/graphql-codegen":"^0.1.0","@shopify/api-codegen-preset":"^1.2.0","@graphql-codegen/plugin-helpers":"^6.0.0"},"peerDependencies":{"graphql":">=15.0.0","typescript":">=4.5.0","graphql-config":">=5.0.0","@graphql-codegen/cli":">=5.0.0","@shopify/graphql-codegen":">=0.1.0","@shopify/api-codegen-preset":">=1.0.0","@graphql-codegen/plugin-helpers":">=5.0.0"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/graphql-app-config_1.2.0_1761583624992_0.9160567731454072","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@by-association-only/graphql-app-config","version":"1.3.0","license":"MIT","_id":"@by-association-only/graphql-app-config@1.3.0","maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","dist":{"shasum":"3ff96b8015e6a84d2324fc33a5edd3c5bb8cd955","tarball":"https://registry.npmjs.org/@by-association-only/graphql-app-config/-/graphql-app-config-1.3.0.tgz","fileCount":6,"integrity":"sha512-l31IRJcTtPTERus67LP9hSZZt0P/ZrD4oTRhBdNKghwwus8yDQQWlMdadUA0gSUtoYqVanaB/oh/6bsw1jub+w==","signatures":[{"sig":"MEQCIH8e7yRzo3/DqF2VfnR8o/3Kjx0zs0NYsvyJ1R8dRQvWAiBGeGd4dtQa8hEyCz8GAsk4HJCDnu17nBppJUfrIiK/lA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39949},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"3ff96b8015e6a84d2324fc33a5edd3c5bb8cd955","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"type-check":"tsc --noEmit"},"_npmUser":{"name":"dangamble","email":"dan@bao.agency"},"_integrity":"sha512-l31IRJcTtPTERus67LP9hSZZt0P/ZrD4oTRhBdNKghwwus8yDQQWlMdadUA0gSUtoYqVanaB/oh/6bsw1jub+w==","repository":{"url":"git+https://github.com/baoagency/shopify-apps.git","type":"git"},"_npmVersion":"10.8.3","description":"BAO's Shopify App helpers","directories":{},"_nodeVersion":"24.3.0","dependencies":{"graphql-config":"^5.1.5","@shopify/graphql-codegen":"^0.1.0","@graphql-codegen/typescript":"^6.0.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.1-rc","@graphql-codegen/introspection":"^6.0.1"},"peerDependencies":{"graphql":"^16.11.0","@graphql-codegen/cli":"^6.0.1","@shopify/api-codegen-preset":"^1.2.0","@graphql-codegen/plugin-helpers":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/graphql-app-config_1.3.0_1783355089254_0.8638564392910018","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@by-association-only/graphql-app-config","version":"1.4.0","license":"MIT","_id":"@by-association-only/graphql-app-config@1.4.0","maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","dist":{"shasum":"1d0d16b5972e0f3d4bf80d37c3e7084052e50227","tarball":"https://registry.npmjs.org/@by-association-only/graphql-app-config/-/graphql-app-config-1.4.0.tgz","fileCount":7,"integrity":"sha512-8r0Oo4QtHW8UsanuPVrgbqtfQuMJ0oGW6KoOe1nMI3fn4J/hhPmI7iLPrEtsEdHNqf00MqGisCMjS0tDwY6ulA==","signatures":[{"sig":"MEQCIGYYKMwzEhI+HayqIiFoFn24aL/9eG7JrbL/AGeWnMWxAiA93Jat4IsI3JN6J6Z24s76avrtY3GVximGMRgDasZGBA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49117},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"1d0d16b5972e0f3d4bf80d37c3e7084052e50227","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"type-check":"tsc --noEmit"},"_npmUser":{"name":"dangamble","email":"dan@bao.agency"},"_integrity":"sha512-8r0Oo4QtHW8UsanuPVrgbqtfQuMJ0oGW6KoOe1nMI3fn4J/hhPmI7iLPrEtsEdHNqf00MqGisCMjS0tDwY6ulA==","repository":{"url":"git+https://github.com/baoagency/shopify-apps.git","type":"git"},"_npmVersion":"10.8.3","description":"BAO's Shopify App helpers","directories":{},"_nodeVersion":"24.3.0","dependencies":{"graphql-config":"^5.1.5","@shopify/graphql-codegen":"^0.1.0","@graphql-codegen/typescript":"^6.0.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^7.0.2","@graphql-codegen/introspection":"^6.0.1"},"peerDependencies":{"graphql":"^16.11.0","@graphql-codegen/cli":"^6.0.1","@shopify/api-codegen-preset":"^1.2.0","@graphql-codegen/plugin-helpers":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/graphql-app-config_1.4.0_1784117918801_0.5148975420451247","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@by-association-only/graphql-app-config","description":"BAO's Shopify App helpers","version":"1.5.0","type":"module","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"module":"./dist/index.js","main":"./dist/index.cjs","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","license":"MIT","repository":{"type":"git","url":"git+https://github.com/baoagency/shopify-apps.git"},"scripts":{"type-check":"tsc --noEmit"},"peerDependencies":{"@graphql-codegen/cli":"^6.0.1","@graphql-codegen/plugin-helpers":"^5.0.0","@shopify/api-codegen-preset":"^1.2.0","graphql":"^16.11.0"},"dependencies":{"@graphql-codegen/typescript":"^6.0.2","@shopify/graphql-codegen":"^0.1.0","graphql-config":"^5.1.5"},"devDependencies":{"@graphql-codegen/introspection":"^6.0.1","typescript":"^7.0.2"},"_id":"@by-association-only/graphql-app-config@1.5.0","_integrity":"sha512-jhJlNmp2nWjQTXRi/EAZuv0fptUadrzWzrg0Sy72OT8cO9B78zc+WV6ks/5GUt4ah54VnUprH4z3dycXHjvBKw==","_nodeVersion":"24.3.0","_npmVersion":"10.8.3","shasum":"22109a705385ac704325701acc536e0f2aabd49e","dist":{"integrity":"sha512-jhJlNmp2nWjQTXRi/EAZuv0fptUadrzWzrg0Sy72OT8cO9B78zc+WV6ks/5GUt4ah54VnUprH4z3dycXHjvBKw==","shasum":"22109a705385ac704325701acc536e0f2aabd49e","tarball":"https://registry.npmjs.org/@by-association-only/graphql-app-config/-/graphql-app-config-1.5.0.tgz","fileCount":7,"unpackedSize":52228,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBpVAc8x4nI7a4MBvgnBNl+/d/AFRrsbeClIci03FzVkAiBykUlqnFHAcBz+7MZU8Y7dmjkfl8msGXGsn+VR5FRsIg=="}]},"_npmUser":{"name":"dangamble","email":"dan@bao.agency"},"directories":{},"maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/graphql-app-config_1.5.0_1784124590816_0.8648642450043891"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-24T19:01:34.099Z","modified":"2026-07-15T14:09:51.105Z","1.0.0":"2025-10-24T19:01:34.446Z","1.1.0":"2025-10-27T10:23:49.107Z","1.2.0":"2025-10-27T16:47:05.186Z","1.3.0":"2026-07-06T16:24:49.385Z","1.4.0":"2026-07-15T12:18:38.969Z","1.5.0":"2026-07-15T14:09:50.963Z"},"license":"MIT","homepage":"https://github.com/baoagency/shopify-apps/tree/main/packages/graphql-app-config#readme","repository":{"type":"git","url":"git+https://github.com/baoagency/shopify-apps.git"},"description":"BAO's Shopify App helpers","maintainers":[{"name":"dangamble","email":"dan@bao.agency"},{"name":"eng9911","email":"m.p.england@gmail.com"}],"readme":"# @by-association-only/graphql-app-config\n\nGraphQL codegen configuration for Shopify apps. One `getConfig()` call in `graphql.config.js` wires up schema introspection, base types, and typed operations for the Admin and Storefront APIs.\n\n## Install\n\n```bash\nbun add -D @by-association-only/graphql-app-config @graphql-codegen/cli graphql\n```\n\n## Single API (Admin)\n\n```javascript\n// graphql.config.js\nimport { getConfig } from '@by-association-only/graphql-app-config'\n\nexport default getConfig({\n\tapiVersion: '2026-07',\n\tdocuments: ['./src/**/*.{ts,tsx}'],\n\toutputDir: './src/types',\n})\n```\n\nRunning `graphql-codegen` produces, in `outputDir`:\n\n| File | Purpose |\n|------|---------|\n| `admin-{version}.schema.json` | Cached introspected schema (generated once) |\n| `admin.types.ts` | Base schema types |\n| `admin.generated.ts` | Typed operations for your documents |\n\nAdmin consumers bind the generated operations to the client by wrapping the interface extension themselves via `preset.extendInterfaceExtension` — see `test/fixtures/cli-app/graphql.config.js` for a complete working example (it is exercised by the test suite with the real `graphql-codegen` CLI).\n\n## Admin and Storefront side by side\n\nPass an array — each entry keeps its own documents glob, API version, and output files, generated in one `graphql-codegen` run with no cross-contamination:\n\n```javascript\nimport { ApiType, getConfig } from '@by-association-only/graphql-app-config'\n\nexport default getConfig([\n\t{\n\t\tapiVersion: '2026-07',\n\t\tdocuments: ['./src/**/*.{ts,tsx}'],\n\t\toutputDir: './src/types',\n\t},\n\t{\n\t\tapiType: ApiType.Storefront,\n\t\tapiVersion: '2026-01',\n\t\tdocuments: ['./src/storefront/**/*.{ts,tsx}'],\n\t\toutputDir: './src/types',\n\t},\n])\n```\n\nThis adds `storefront-{version}.schema.json`, `storefront.types.ts`, and `storefront.generated.ts` alongside the admin files.\n\nUnlike Admin, the storefront output augments `@by-association-only/shopify-graphql-client` out of the box — no `extendInterfaceExtension` needed. Import the generated file once and storefront calls are typed, `@inContext` included:\n\n```typescript\nimport { createStorefrontClient } from '@by-association-only/shopify-graphql-client'\nimport './types/storefront.generated'\n\nconst client = createStorefrontClient({\n\tapiVersion: '2026-01',\n\tprivateAccessToken: env.STOREFRONT_PRIVATE_TOKEN,\n\tshop: 'example.myshopify.com',\n})\n\nconst response = await client.request(ProductsQuery, {\n\tvariables: { country: CountryCode.Gb, language: LanguageCode.En },\n})\n```\n\n## How multi-API mode composes\n\nThe codegen CLI only reads the default graphql-config project, and merges any project-level `documents`/`schema` into every generates target. So in array mode:\n\n- all generates targets live on the default project, each carrying its own `documents` and `schema`;\n- the default project itself carries neither;\n- per-API projects (`admin`, `storefront`) expose `documents` + `schema` for IDE tooling only.\n\nSingle-object calls keep the exact shape previous versions produced.\n\n## Scalars\n\nShopify's `DateTime` and `URL` scalars map to `string` by default, so fields like `Metaobject.createdAt`, `Metaobject.updatedAt` and `Image.url` infer as `string` rather than `unknown`. The defaults apply to every generated API (Admin, Storefront, Customer); scalars absent from a schema are ignored.\n\nPass `scalars` to add or override mappings. Explicit entries win over the defaults, and other Shopify scalars keep their existing behaviour:\n\n```javascript\nexport default getConfig({\n\tapiVersion: '2026-07',\n\tdocuments: ['./src/**/*.{ts,tsx}'],\n\toutputDir: './src/types',\n\tscalars: {\n\t\t// override a default\n\t\tDateTime: 'Date',\n\t\t// add your own\n\t\tDecimal: 'number',\n\t},\n})\n```\n\nA string maps both the input and output positions; pass `{ input, output }` to target them independently.\n\n## Extensions\n\nDirectories under `./extensions/` containing a `schema.graphql` are added as their own graphql-config projects automatically.\n","readmeFilename":"README.md"}