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

[legacy-framework] Fix queries & mutations to work with trailing slash config (patch) #2392

Merged
merged 4 commits into from
May 28, 2021

Conversation

timbooker
Copy link

@timbooker timbooker commented May 25, 2021

Closes: blitz-js/legacy-framework#286

This PR adds the implementation to consider the trailingSlash configuration in the API requests from either await direct function calls inside useEffects or useQuery.

Checklist
Added trailingSlash to the blitz runtime dat
Updated getApiUrlFromResolverFilePath to add trailing slash if getBlitzRuntimeData().trailingSlash is true.

Copy link
Member

@flybayer flybayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!

@flybayer flybayer changed the title Added trailingslash support for API endpoints. Fix queries & mutations to work with trailing slash config (patch) May 28, 2021
@flybayer flybayer added the 0 - <(^_^)> - merge it! ✌️ Kodiak automerge label May 28, 2021
@kodiakhq kodiakhq bot merged commit ada67b5 into blitz-js:canary May 28, 2021
@blitzjs-bot
Copy link
Contributor

Added @timbooker contributions for code and test

@itsdillon itsdillon changed the title Fix queries & mutations to work with trailing slash config (patch) [legacy-framework] Fix queries & mutations to work with trailing slash config (patch) Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting trailingSlash: true in the blitz configuration creates 308 redirects for all api requests.
3 participants