我想向我的 Apollo 服务器添加一个传统的 rest 端点,并且我想重用 Meteors 身份验证系统。但是,Meteor.user()
未在此上下文中定义。端点不会查找或询问用户凭据。
createApolloServer( ... , {
configServer: (app) => {
app.use('/myEndpoint', () => {
/* I want to have a meteor userId here */
});
},
});