Skip to content

Multi-Shop support #271

Description

@freb97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnice-to-haveNot the highest priority right now, but a useful feature / fix

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions