@sanity/client 6.1.0-perspective.1 → 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.
@@ -834,17 +834,19 @@ function _requestObservable(client, httpRequest, options) {
834
834
  ...options.query
835
835
  };
836
836
  }
837
- if (typeof config.perspective === "string" && config.perspective !== "all") {
838
- options.query = {
839
- perspective: config.perspective,
840
- ...options.query
841
- };
842
- }
843
- if (config.resultSourceMap) {
844
- options.query = {
845
- resultSourceMap: true,
846
- ...options.query
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)