sanity-io / vscode-sanity

Visual Studio Code extension for developing applications powered by Sanity.io
MIT License
51 stars 8 forks source link

Executing queries are using the wrong dataset when developing #13

Closed jeslenbucci closed 2 weeks ago

jeslenbucci commented 2 years ago

The datasets for my sanity.json file looks something like this:

  "api": {
    "projectId": "xxxxxxxx",
    "dataset": "production"
  },
  "env": {
    "development": {
      "api": {
        "projectId": "xxxxxxxx",
        "dataset": "development"
      }
    }
  },

So, when I'm developing, I use a development dataset. However, when I click the Execute Query, the development environment is ignored and only the default dataset is used. Is there a way to configure the extension to use the development dataset when in development mode?

runeb commented 2 weeks ago

Apologies for the delay on this. The plugin only supported v2 of Sanity which had a different configuration format. We have now updated the plugin to support the newer sanity.cli.js|ts config file.