nextjs-firebase-authentication
nextjs-firebase-authentication copied to clipboard
Looking for user in session cookie for each field resolved?
Hello,
As far as I understand, the meMiddleware function makes Firebase look for the user based on the token provided in the session cookie.
As a middleware, it is executed for every field of the GraphQL request: isn't it overkill, couldn't it be done only once in the context when instantiating ApolloServer?
Basically, I don't understand why you switched to a middleware in https://github.com/rwieruch/nextjs-firebase-authentication/commit/c9adeaa626541c2a02a370457542f9412d81492f What are the advantages?