Skip to content

Should createClient be called only once or many times? #414

Answered by elprans
kotx asked this question in Q&A
Discussion options

You must be logged in to vote

createClient should be called once per app. This can be done globally. withGlobals() returns a shallow wrapper over a client with configured globals and should be called whenever you want to set a global variable, i.e. in a request middleware or request handler.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kotx
Comment options

Answer selected by kotx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants