You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the extension configures a client that uses the default version v1. While this works for most GROQ queries, newer features added in later versions after the versioning schema changed to MM-DD-YYYY don't work because of this. For example, trying to use the pt::text() function causes the query to fail due to the configured client using v1, and not v2021-03-25 or later when the function was introduced to the API.
Proposed Solution:
Add a configuration property to the extension (something like "sanity.apiVersion") that allows users to configure the version.
The text was updated successfully, but these errors were encountered:
Theoretically, if you add apiVersion to the api key in sanity.json, it should be picked up by the extension. However, the @sanity/client package used in this extension is version 2, which doesn't seem to support apiVersion. So before you can add apiVersion to sanity.json, the package would need to be updated to version 3.
Personally, I went into .vscode/extensions/sanity-io.vscode-sanity-0.1.4 and upgraded @sanity/client manually. Then added apiVersion to sanity.json.
Description:
Currently the extension configures a client that uses the default version
v1
. While this works for most GROQ queries, newer features added in later versions after the versioning schema changed toMM-DD-YYYY
don't work because of this. For example, trying to use thept::text()
function causes the query to fail due to the configured client usingv1
, and notv2021-03-25
or later when the function was introduced to the API.Proposed Solution:
Add a configuration property to the extension (something like
"sanity.apiVersion"
) that allows users to configure the version.The text was updated successfully, but these errors were encountered: