How is inner context persistent if we call 'createContext' for every batch?
As per title. According to the docs, inner context doesn't depend on the request, and is useful for persistent objects like your database connection. However, given that
createContext
createContext
is called for every request, I fail to see how calling
Your context holds data that all of your tRPC procedures will have access to, and is a great place to put things like database connections or authentication information.