@watson I have found the issue.
it is the same issue as the topic Can't pass session data into Apollo Server Context - #2 by trevor.scheer
I have not try with a real frontend yet. i am using apollo studio and apparently i have to add the following :
plugins: [ApolloServerPluginDrainHttpServer({ httpServer }),
ApolloServerPluginLandingPageLocalDefault({ includeCookies: true })],
});
So ,when Using Apollo Explorer, you have to setup the following to be able to use the Cookies in the context function :
plugins: [ApolloServerPluginDrainHttpServer({ httpServer }),
ApolloServerPluginLandingPageLocalDefault({ includeCookies: true })],
});
Thank you for your help.