{"_id":"@aligent/bigcommerce-graphql-module","_rev":"9-f33b0c5f5eb01a15f8a016d6ce56a784","name":"@aligent/bigcommerce-graphql-module","dist-tags":{"latest":"1.0.9"},"versions":{"1.0.7":{"name":"@aligent/bigcommerce-graphql-module","version":"1.0.7","_id":"@aligent/bigcommerce-graphql-module@1.0.7","maintainers":[{"name":"sam.tyler","email":"sam.tyler@aligent.com.au"},{"name":"torbjorn.vanheeswijck","email":"torbjorn.vanheeswijck@aligent.com.au"},{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},{"name":"jarrod.swift","email":"jarrod.swift@aligent.com.au"}],"dist":{"shasum":"ae5c25146c3935e4c6ee8918d864d96a02fd406d","tarball":"https://registry.npmjs.org/@aligent/bigcommerce-graphql-module/-/bigcommerce-graphql-module-1.0.7.tgz","fileCount":647,"integrity":"sha512-MNxEAzMgn7ViKwXiZMHo4ORaAmMZ48KDIkWKlFjq3lXDqQnp9+wm6/JNOjkrzD4MKAHMGex3XzNQUOCgdOO5zw==","signatures":[{"sig":"MEUCIFFNJIe6ywjVT/nGC1/e0SXxdPRxvlx7J4Gw8/aZTcgJAiEAri3lLi5O2iKelOD7Cyv4JIe1vPPE4ZjSivrTe6jS2AA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8112764},"main":"./src/index.js","type":"commonjs","types":"./src/index.ts","gitHead":"d8a4c2e7e77644dbed0f15cb3c8df5d1efaf0af9","_npmUser":{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},"_npmVersion":"9.8.1","description":"## Global Context Type","directories":{},"_nodeVersion":"18.18.2","dependencies":{"keyv":"^4.5.4","uuid":"^9.0.0","axios":"1.6.7","luxon":"^3.4.3","tslib":"^2.3.0","lodash":"^4.17.21","graphql":"^16.7.0","type-fest":"^4.23.0","graphql-tag":"^2.12.0","aws-xray-sdk":"^3.5.3","jsonwebtoken":"^9.0.0","@envelop/core":"^4.0.0","graphql-modules":"2.3.x","reflect-metadata":"^0.1.13","@graphql-codegen/cli":"^5.0.0","@graphql-tools/load-files":"^7.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bigcommerce-graphql-module_1.0.7_1730257878759_0.9990948197572664","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@aligent/bigcommerce-graphql-module","version":"1.0.6","_id":"@aligent/bigcommerce-graphql-module@1.0.6","maintainers":[{"name":"sam.tyler","email":"sam.tyler@aligent.com.au"},{"name":"torbjorn.vanheeswijck","email":"torbjorn.vanheeswijck@aligent.com.au"},{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},{"name":"jarrod.swift","email":"jarrod.swift@aligent.com.au"}],"dist":{"shasum":"ba64c11eeb07de6f882b7ba45fb798049a7dec53","tarball":"https://registry.npmjs.org/@aligent/bigcommerce-graphql-module/-/bigcommerce-graphql-module-1.0.6.tgz","fileCount":641,"integrity":"sha512-oGVlr29ojbw89CnQKQSPssWh7fmgqJdIEEGH6GIt3D+qr2nMZW8exYq+jetE4Lbk12SceEP1R/62Ll+kY4UbWQ==","signatures":[{"sig":"MEUCIF/UWf4qaqRfE9eFyA1OWz69lSXAeZ3zCLpHumj7F94tAiEA9bFqPVUytPFl6wWM7zxy25coeS2GGBzesPBRZRlLzNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8097161},"main":"./src/index.js","type":"commonjs","_from":"file:bigcommerce-graphql-module-1.0.6.tgz","types":"./src/index.ts","_npmUser":{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},"_resolved":"/home/daniel.vanderploeg/repos/mesh/aligent-graphql-mesh/bigcommerce-graphql-module-1.0.6.tgz","_integrity":"sha512-oGVlr29ojbw89CnQKQSPssWh7fmgqJdIEEGH6GIt3D+qr2nMZW8exYq+jetE4Lbk12SceEP1R/62Ll+kY4UbWQ==","_npmVersion":"9.8.1","description":"## Configuration","directories":{},"_nodeVersion":"18.18.2","dependencies":{"keyv":"^4.5.4","uuid":"^9.0.0","axios":"1.6.7","luxon":"^3.4.3","tslib":"^2.3.0","lodash":"^4.17.21","graphql":"^16.7.0","type-fest":"^4.23.0","graphql-tag":"^2.12.0","aws-xray-sdk":"^3.5.3","jsonwebtoken":"^9.0.0","@envelop/core":"^4.0.0","graphql-modules":"^2.2.0","reflect-metadata":"^0.1.13","@graphql-codegen/cli":"^5.0.0","@graphql-tools/load-files":"^7.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bigcommerce-graphql-module_1.0.6_1730417182102_0.7992682161082105","host":"s3://npm-registry-packages"}},"0.0.27":{"name":"@aligent/bigcommerce-graphql-module","version":"0.0.27","_id":"@aligent/bigcommerce-graphql-module@0.0.27","maintainers":[{"name":"sam.tyler","email":"sam.tyler@aligent.com.au"},{"name":"torbjorn.vanheeswijck","email":"torbjorn.vanheeswijck@aligent.com.au"},{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},{"name":"jarrod.swift","email":"jarrod.swift@aligent.com.au"}],"dist":{"shasum":"da024c6a719ed1deae57b4698977707c4cce697e","tarball":"https://registry.npmjs.org/@aligent/bigcommerce-graphql-module/-/bigcommerce-graphql-module-0.0.27.tgz","fileCount":596,"integrity":"sha512-LlAZLKAUej6z8FSt36It+P6Lbr5oYGmEZzieQsVmJK9ZJl8apSV1cCNV6ft2Acq9cV89HME487mpxxZJ+D7vqg==","signatures":[{"sig":"MEQCIE13+hVjFVjoMhtLwIuUzJ+I01pUpBpywDfdC9Hl2fcMAiALnYwxU/ZywqAo70NLl1TaZGNjXFZiC+YbskI19O9MgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7436727},"main":"./src/index.js","type":"commonjs","_from":"file:bigcommerce-graphql-module-0.0.27.tgz","types":"./src/index.ts","_npmUser":{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},"_resolved":"/home/daniel.vanderploeg/Downloads/bigcommerce-graphql-module-0.0.27.tgz","_integrity":"sha512-LlAZLKAUej6z8FSt36It+P6Lbr5oYGmEZzieQsVmJK9ZJl8apSV1cCNV6ft2Acq9cV89HME487mpxxZJ+D7vqg==","_npmVersion":"10.9.0","description":"## Configuration","directories":{},"_nodeVersion":"22.10.0","dependencies":{"keyv":"^4.5.4","uuid":"^9.0.0","axios":"1.6.7","luxon":"^3.4.3","tslib":"^2.3.0","lodash":"^4.17.21","graphql":"^16.7.0","graphql-tag":"^2.12.0","aws-xray-sdk":"^3.5.3","jsonwebtoken":"^9.0.0","@envelop/core":"^4.0.0","graphql-modules":"^2.2.0","graphql-request":"^6.1.0","reflect-metadata":"^0.1.13","@graphql-codegen/cli":"^5.0.0","@graphql-tools/load-files":"^7.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bigcommerce-graphql-module_0.0.27_1730781207199_0.6080274545198896","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"@aligent/bigcommerce-graphql-module","version":"1.0.8","_id":"@aligent/bigcommerce-graphql-module@1.0.8","maintainers":[{"name":"jarrod.swift","email":"jarrod.swift@aligent.com.au"},{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},{"name":"sam.tyler","email":"sam.tyler@aligent.com.au"},{"name":"torbjorn.vanheeswijck","email":"torbjorn.vanheeswijck@aligent.com.au"}],"dist":{"shasum":"dcdbb16fd1cb70f3218a48c62db8e51642dd0d8d","tarball":"https://registry.npmjs.org/@aligent/bigcommerce-graphql-module/-/bigcommerce-graphql-module-1.0.8.tgz","fileCount":647,"integrity":"sha512-xev7O0XZk7q9MJowKa9nUyI4aMN7+Gdhe0N198oB3A0F8xEutnnjHwsgHDQcOtLbk6qvXu4QOzc/altLFrcOaA==","signatures":[{"sig":"MEQCIEhvLtmNhSgCrLJcQdQEh/IphM8kYrmLhiYMn0twZWuDAiAYNr0bqjsYQPI2eS0Gd8RWoD3KuPfkwWlemMAv3DmW3Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8150286},"main":"./src/index.js","type":"commonjs","types":"./src/index.ts","gitHead":"608759e33df9c76a2cead5101d7fe665b02c1a47","_npmUser":{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},"_npmVersion":"9.8.1","description":"## Global Context Type","directories":{},"_nodeVersion":"18.18.2","dependencies":{"keyv":"^4.5.4","uuid":"^9.0.0","axios":"1.6.7","luxon":"^3.4.3","tslib":"^2.3.0","lodash":"^4.17.21","graphql":"^16.7.0","type-fest":"^4.23.0","graphql-tag":"^2.12.0","aws-xray-sdk":"^3.5.3","jsonwebtoken":"^9.0.0","@envelop/core":"^4.0.0","graphql-modules":"2.3.x","reflect-metadata":"^0.1.13","@graphql-codegen/cli":"^5.0.0","@graphql-tools/load-files":"^7.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bigcommerce-graphql-module_1.0.8_1738295991102_0.0333529480706809","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"@aligent/bigcommerce-graphql-module","version":"1.0.9","_id":"@aligent/bigcommerce-graphql-module@1.0.9","maintainers":[{"name":"jarrod.swift","email":"jarrod.swift@aligent.com.au"},{"name":"aligent-danielvanderploeg","email":"daniel.vanderploeg@aligent.com.au"},{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},{"name":"sam.tyler","email":"sam.tyler@aligent.com.au"},{"name":"torbjorn.vanheeswijck","email":"torbjorn.vanheeswijck@aligent.com.au"}],"dist":{"shasum":"f2769ed0436a14d9ee925f44a6d5e52db54983f2","tarball":"https://registry.npmjs.org/@aligent/bigcommerce-graphql-module/-/bigcommerce-graphql-module-1.0.9.tgz","fileCount":647,"integrity":"sha512-WfQPaY58tD4vYWHmrEJgbBCS6Rwf6k2B3lINCnURqwJSVHEfquBI/pvs8l7K7HY73f/kSHXTIZ+YD78D7Xb03w==","signatures":[{"sig":"MEUCIQCBVYAe4IflHoD9GsDIgKSfKTnTaYd+giOyHBZpJ/0u+wIgP2U6zbW3lhh7Dg1yGWyMhakBeCHAOfGCYNMMsfUaL2M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8151877},"main":"./src/index.js","type":"commonjs","types":"./src/index.ts","gitHead":"eded7786d5b126c453a93e731458263f6b11a952","_npmUser":{"name":"aligent-bot","email":"devops+npm@aligent.com.au"},"_npmVersion":"9.8.1","description":"## Global Context Type","directories":{},"_nodeVersion":"18.18.2","dependencies":{"keyv":"^4.5.4","uuid":"^9.0.0","axios":"1.6.7","luxon":"^3.4.3","tslib":"^2.3.0","lodash":"^4.17.21","graphql":"^16.7.0","type-fest":"^4.23.0","graphql-tag":"^2.12.0","aws-xray-sdk":"^3.5.3","jsonwebtoken":"^9.0.0","@envelop/core":"^4.0.0","graphql-modules":"2.3.x","reflect-metadata":"^0.1.13","@graphql-codegen/cli":"^5.0.0","@graphql-tools/load-files":"^7.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bigcommerce-graphql-module_1.0.9_1741142575141_0.037487291954134916","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-10-30T03:11:18.663Z","modified":"2026-05-22T06:22:07.104Z","1.0.7":"2024-10-30T03:11:19.098Z","1.0.6":"2024-10-31T23:26:22.352Z","0.0.27":"2024-11-05T04:33:27.487Z","1.0.8":"2025-01-31T03:59:51.420Z","1.0.9":"2025-03-05T02:42:55.362Z"},"description":"## Global Context Type","maintainers":[{"email":"jarrod.swift@aligent.com.au","name":"jarrod.swift"},{"email":"devops+npm@aligent.com.au","name":"aligent-bot"},{"email":"tom.thorogood@aligent.com.au","name":"tom.thorogood"}],"readme":"# BigCommerce GraphQl Module\n\n## Global Context Type\n\nThis module extends the `ModuleContext` type as per the [GraphQL Modules documentation](https://the-guild.dev/graphql/modules/docs/essentials/type-safety#shaping-context-type) in [/src/types/index.ts](./src/types/index.ts):\n\n```typescript\ninterface GlobalContext {\n  headers: Record<string, string>;\n  cache: Keyv;\n  request: Request;\n}\n```\n\nThe server using this module must therefore be configured to provide these properties on the `context` object.\n\n## Configuration\n\nThe configuration interface is found here: `packages/modules/bigcommerce/src/index.ts` and currently contains these properties:\n\n- `graphqlEndpoint` - BigCommerce Graphql endpoint for your store\n- `jwtPrivateKey` - Random string used to encrypt JWT tokens\n- `authToken` - X-Auth-Token header value\n- `clientSecret` - BigCommerce API Client Secret\n- `clientId` - BigCommerce API Client ID\n- `storeHash` - BigCommerce Store hash\n\nFetching config in a resolver:\n\n```typescript\nimport { ModuleConfig } from '../../providers';\n\nexport const someResolver: QueryResolvers['a-resolver-type'] = {\n  resolve: async (_root, _args, context, _info) => {\n    const config = context.injector.get(ModuleConfig);\n\n    return {};\n  },\n};\n```\n\nFetching config in a class:\n\n```typescript\nimport { ModuleConfig } from '../../providers';\nimport { BigCommerceModuleConfig } from '@aligent/bigcommerce-graphql-module';\n\n@Injectable({})\nexport class SomeService {\n  constructor(@Inject(ModuleConfig) private config: BigCommerceModuleConfig) {}\n\n  getGraphQlEndpoint() {\n    return this.config.graphqlEndpoint;\n  }\n}\n```\n\n## The BigCommerce GraphQl SDK\n\nFetching the sdk in a resolver:\n\n```typescript\nimport { BigCommerceGraphQlClient } from '../../providers/clients';\nimport { Sdk } from '@aligent/bigcommerce-operations';\n\nexport const someResolver: QueryResolvers['a-resolver-type'] = {\n  resolve: async (_root, _args, context, _info) => {\n    const sdk: Sdk = context.injector.get(BigCommerceGraphQlClient);\n\n    const response = sdk.login({\n      email,\n      password,\n    });\n\n    return {};\n  },\n};\n```\n\n### Adding new queries to the Sdk\n\n1. Write out your gql query in a new file in `packages/modules/bigcommerce/src/apis/graphql/requests/`\n\n   ```typescript\n   import { gql } from 'graphql-tag';\n   import { stripIgnoredCharacters } from 'graphql/utilities/stripIgnoredCharacters';\n   import { print } from 'graphql/index';\n\n   export const customerAttribute = stripIgnoredCharacters(\n     print(gql`\n       query customerAttribute($attributeId: Int!) {\n         customer {\n           attributes {\n             attribute(entityId: $attributeId) {\n               entityId\n               name\n               value\n             }\n           }\n         }\n       }\n     `)\n   );\n   ```\n\n2. Re-Run the codegen to add your query to the SDK\n   `yarn run codegen`\n\n3. Make your request!\n   ```typescript\n   const response = sdk.customerAttribute({\n     attributeId: 123,\n   });\n   ```\n","readmeFilename":"README.md"}