-
Notifications
You must be signed in to change notification settings - Fork 968
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
feat: add customize content type parsers for api plugin #10573
Conversation
…t/async avvio issue
@@ -54,6 +56,11 @@ export async function redwoodFastifyAPI( | |||
} | |||
} | |||
|
|||
// Run users custom server configuration function |
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 @Josh-Walker-GM and I found that the order where custom server config was added matters - if after loading functions, then plugins like fastify complress did not work properly.
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.
@Josh-Walker-GM I confirmed I could compress api requests:
But, graphql requests are not.
Can we add that -- or should we always compress both for api and graphql servers?
We'd still need this in createServer if the user decide to mount and server more that just the api and graphql, but we do want to let people compress graphql responses.
Also - is this a breaking change? If people use register, they will have to reconfigure their server.
@Josh-Walker-GM Should we add:
|
We can add configure graphql server too if you want. I suspected we'd want to but just kept it as api here to keep the PR small only address the issue that came up. I don't know if I'd consider this a breaking change. Using register doesn't work and we haven't changed that behaviour - that was incorrect information on our docs to say it did. What we have done here is add in functionality to allow you do configure the server. I'd treat this is a combo of doc fix and feature addition. I might be looking at it wrong though so please push back if you think differently. |
@Josh-Walker-GM sounds good I’ll make an issue for GraphQL compression as well |
Alterations to #10449 --------- Co-authored-by: scott1028 <mic1028002@gmail.com> Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com> Co-authored-by: David Thyresson <dthyresson@gmail.com>
Alterations to #10449