This message was deleted.
# 질문
s
This message was deleted.
h
apollo 랑 어떤 연관이 있나요? 미들웨어는 제하고 보셔도 될것같은데요
a
예를들어서 res.cookie 와 같은 코드를 쓰기 위해서 response 객체에 접근해야되는데 리졸버에서 넘겨받는 방법?을 잘 모르겠어요 Ben awad 이분이 예전에 올린 코드가 있는데 https://github.com/benawad/node-ts-graphql-boilerplate/blob/5a7452107ba2b42d07c3464d8813969160ec81f4/src/index.ts#L44-L48 Apollo server2 에선 사라진 api 같아서요
t
apollo-server-express인 경우에는 context에 req, res를 주입할수있어요.
a
오 혹시 관련링크 알려주실 수 있을까요?..
t
Copy code
new ApolloServer({
  context({req, res}) {
    return {
      req,
      res,
      //...
    }
  }
})
a
오 간단하네요!! 감사합니다 __) 👍
t
음...? 링크까지 필요한가요 ㅎㅎ ApolloServer 생성할때 context
네네