nuxt-modules / nuxt-modules/shopify
Multi-Shop support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 182
- Forks
- 13
- Avg merge
- 14h 31m
- Merged PRs (30d)
- 10
Description
Describe the feature
Currently it's not possible to configure more than one shop using the module. This is because we rely on the schema from only one store to get the API types. We could make multiple stores configurable and have each generate their own types, but that would be a big change and a much more complicated module config.
What we could do more easily though is add an optional shops config option, where different stores can be configured and then the shop that would be used would become a request header or setting in the api client:
export default definNuxtConfig({
shopify: {
name: 'my-store-name-for-codegen',
clients: { storefront: { ... } },
shops: {
shop1: { name: 'my-other-shop-1', clients: { ... } },
shop2: { name: 'my-other-shop-2', clients: { ... },
}
}
})
Maybe not the most optimal solution but it would enable a true multi-store-setup at least.
For now it hasn't come up but i want to hold the idea here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Shopify configuration, schema-based code generation, and API client are currently connected. Evaluate the proposed optional shops configuration and how the selected shop could reach the request header or API client setting. Done would mean multiple stores can be configured and selected without requiring separate generated types for each store.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, nuxt, typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100