-
Notifications
You must be signed in to change notification settings - Fork 323
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
Remove support for custom responses #1340
Conversation
query: QUERY, | ||
variables: { | ||
language: languageCode, | ||
language: 'EN', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that, unless the developer provides a defaultLanguageCode
in their hydrogen.config.js
, we default to 'EN' anyway. If the developer wishes to customize language code based on e.g. domain, they can add functionality here to do so, since it's part of the demo store template code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing the docs around this as well, @jplhomer!
Could we also update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We can also make some existing functions like onAllReady
or prepareForStreaming
synchronous now that this code is removed.
Description
Fixes #1267.
The concept of "custom responses" was introduced early in Hydrogen's development, prior to API routes. However, we haven't seen this functionality used beyond simple
sitemap.xml
orrobots.txt
purposes — both of which can be handled by API routes.This PR removes
response.send()
as well as the custom body, which only existed to support custom responses.Before submitting the PR, please make sure you do the following:
fixes #123
)yarn changeset add
if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning