Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: send perspective as query param when using POST method #930

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

niklas-may
Copy link
Contributor

@niklas-may niklas-may commented Nov 5, 2023

This solves #909 and fixes the same bug as on picosanity where POSTed queries with a perspective return a 400 error.

Note on current test setup: The error is returned from a Sanity server receiving the request. Therefore your current test setup can not detect this error because the $fetch function is mocked.
Should we think about refactoring client tests to not mock the $fetch?

Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for nuxt-sanity-module canceled.

Name Link
🔨 Latest commit 6ce799a
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-sanity-module/deploys/6554d879bd59e300086f3c63

@niklas-may niklas-may changed the title fix: send perspective as query param when using POST method fix: send perspective as query param when using POST method Nov 5, 2023
src/runtime/client.ts Outdated Show resolved Hide resolved
@danielroe
Copy link
Collaborator

Thank you ❤️

Yes, that's a good idea to rethink tests but I'm reluctant to hit a real sanity server when testing....

@danielroe danielroe merged commit 4bbdc8f into nuxt-modules:main Nov 15, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants