2. Apollo Server Response to Apollo-Client Request
I've also written a plugin
This plugin attaches x-forward headers
from incoming gql Request (from website)
to returning Response (back to website)
3. Apollo-Server Request to backend API
In the file 'helpers/callbackend.js'
I've reattached x-forward header
from incoming gql Request (from website)
to outgoing Requests (to backend api)
Summary
1. I've introduced a hook onto the Apollo Provider instantiation in './index.js' This hook allows for the injecting of Apollo Server Plugins. https://www.apollographql.com/docs/apollo-server/integrations/plugins/
2. Apollo Server Response to Apollo-Client Request I've also written a plugin This plugin attaches x-forward headers from incoming gql Request (from website) to returning Response (back to website)
3. Apollo-Server Request to backend API In the file 'helpers/callbackend.js' I've reattached x-forward header from incoming gql Request (from website) to outgoing Requests (to backend api)