Skip to content

Commit

Permalink
fix: send perspective as query param when using POST method (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklas-may committed Nov 15, 2023
1 parent 3b9703c commit 4bbdc8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export function createClient (config: SanityConfiguration) {
? await $fetch<{ result: T }>(urlBase, {
...fetchOptions,
method: 'post',
body: { query, params, perspective },
body: { query, params },
query: { perspective },
})
: await $fetch<{ result: T }>(`${urlBase}${qs}`, fetchOptions)
return result
Expand Down

0 comments on commit 4bbdc8f

Please sign in to comment.