@mandiwise
Thanks so much for all your work and sharing your knowledge. I've been using your examples to improve our Apollo graphql product - it was a huge messy monolith but now it has a mix of federated goodness and local schema (there are parts of our infrastructure that are off limits so using local typeDefs and resolvers)
All work brilliantly until it comes to passing auth headers when extending entities. I can prove that both the remote and local services use the Auth bearer token as they need that to call api's. But, when extending entities e.g.
extend type User @key(fields: "id") {
id: ID! @external
}
DOWNSTREAM_SERVICE_ERROR
Invalid value "undefined" for header "Authorization"
"stacktrace": [
"GraphQLError: Invalid value "undefined" for header "Authorization"",
" at downstreamServiceError (/Users/davidclare/Documents/strata 2/federated-graphql/app/node_modules/@apollo/gateway/src/executeQueryPlan.ts:474:10)",
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
@mandiwise Thanks so much for all your work and sharing your knowledge. I've been using your examples to improve our Apollo graphql product - it was a huge messy monolith but now it has a mix of federated goodness and local schema (there are parts of our infrastructure that are off limits so using local typeDefs and resolvers)
All work brilliantly until it comes to passing auth headers when extending entities. I can prove that both the remote and local services use the Auth bearer token as they need that to call api's. But, when extending entities e.g.
And this within the resolver
I am getting:
DOWNSTREAM_SERVICE_ERROR
Invalid value "undefined" for header "Authorization"
"stacktrace": [
"GraphQLError: Invalid value "undefined" for header "Authorization"",
" at downstreamServiceError (/Users/davidclare/Documents/strata 2/federated-graphql/app/node_modules/@apollo/gateway/src/executeQueryPlan.ts:474:10)",