@sanity/client 6.1.0-perspective.0 → 6.1.0-perspective.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.cjs +13 -11
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +13 -11
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data/dataMethods.ts +8 -6
- package/src/types.ts +1 -1
- package/umd/sanityClient.js +19 -13
- package/umd/sanityClient.min.js +3 -3
package/dist/index.browser.cjs
CHANGED
|
@@ -834,17 +834,19 @@ function _requestObservable(client, httpRequest, options) {
|
|
|
834
834
|
...options.query
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
if (
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
837
|
+
if (["GET", "HEAD"].indexOf(options.method || "GET") >= 0 && uri.indexOf("/data/query/") === 0) {
|
|
838
|
+
if (config.resultSourceMap) {
|
|
839
|
+
options.query = {
|
|
840
|
+
resultSourceMap: true,
|
|
841
|
+
...options.query
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
if (typeof config.perspective === "string" && config.perspective !== "all") {
|
|
845
|
+
options.query = {
|
|
846
|
+
perspective: config.perspective,
|
|
847
|
+
...options.query
|
|
848
|
+
};
|
|
849
|
+
}
|
|
848
850
|
}
|
|
849
851
|
const reqOptions = requestOptions(config, Object.assign({}, options, {
|
|
850
852
|
url: _getUrl(client, uri, useCdn)
|