From 1396414c7a6b103e5ea028223ae34ab7f867c9ee Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 12 May 2023 15:20:19 +0200 Subject: [PATCH] fix: apply `resultSourceMap` parameter only to queries --- src/data/dataMethods.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/data/dataMethods.ts b/src/data/dataMethods.ts index 32d349bf..adf08eb3 100644 --- a/src/data/dataMethods.ts +++ b/src/data/dataMethods.ts @@ -302,8 +302,11 @@ export function _requestObservable( options.query = {tag: validate.requestTag(tag), ...options.query} } - if (config.resultSourceMap) { - options.query = {resultSourceMap: true, ...options.query} + // GROQ query-only parameters + if (['GET', 'HEAD'].indexOf(options.method || 'GET') >= 0 && uri.indexOf('/data/query/') === 0) { + if (config.resultSourceMap) { + options.query = {resultSourceMap: true, ...options.query} + } } const reqOptions = requestOptions(