Skip to content

Commit cbe3c6d

Browse files
author
thorough-developer
committed
updating readme
1 parent cebf971 commit cbe3c6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ This plugin takes in one of two option named `defaults` and `hook`.
3232
`defaults` are what the values should be if not set. This is optional and not necessary. There are cases where defaults are not wanted nor
3333
necessary.
3434
35-
`hook` is one of the fastify lifecycle hooks. By default it is set to `onRequest`.
35+
`hook` is one of the fastify lifecycle hooks. By default it is set to `onRequest`. Some times where the context is run from matters. For instance, if using a library like Typeorm the context gets lost in Subscribers if the context is run in `onRequest` but does not get lost if run in `preHandler`
36+
(not sure why but that is the motivation for allowing the hook to be configurable).
3637
3738
From there you can set a context in another hook, route, or method that is within scope. For instance:
3839

0 commit comments

Comments
 (0)