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

Allow custom Context Config types for hooks' request properties #3786

Merged
merged 2 commits into from Mar 21, 2022

Conversation

sumbad
Copy link
Contributor

@sumbad sumbad commented Mar 21, 2022

By now, hooks use default Context Config for the request property. This PR implies using a custom Context Config for request in a hook if it was sent (repeats the same logic as for reply).

Checklist

@github-actions github-actions bot added the typescript TypeScript related label Mar 21, 2022
Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

Can you add tsd tests?

@sumbad
Copy link
Contributor Author

sumbad commented Mar 21, 2022

Added tsd tests. It was the first time when I was writing tests for types, hope everything is Ok 😃.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@MarcoLeko
Copy link
Contributor

MarcoLeko commented Mar 21, 2022

Just as a small note: Looks like I implemented the usecase for custom context in my PR as well (with also enabling custom Logger) check out:

  • PR for main: main
  • PR for 3.v: 3.v

Do we have a plan on merge strategy or will you merge as soon as one of the PR's are approved (Which I guess should also be fine since changes should not be conflicting)? @sumbad @mcollina @RafaelGSS

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM.

@mcollina mcollina merged commit 2afc0d7 into fastify:main Mar 21, 2022
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
typescript TypeScript related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants