In order album(p1: String!): Album @http(path: "/v1/albums/{{.args.p1}}") this to work, we have to set the allowedHeaders setting with Authorization else it throws 401 error.
schema @server @upstream(baseURL: "https://api.spotify.com") {
query: Query
}
type Query {
album(p1: String!): Album @http(path: "/v1/albums/{{.args.p1}}")
}
Expected
upstream should've the allowedHeaders setting, which should contain the headers which are required to resolve the http call i.e in following case it's Authorization.
schema @server @upstream(baseURL: "https://api.spotify.com", allowedHeaders: ["Authorization"]) {
query: Query
}
type Query {
album(p1: String!): Album @http(path: "/v1/albums/{{.args.p1}}")
}
Present Behaviour:
In order
album(p1: String!): Album @http(path: "/v1/albums/{{.args.p1}}")
this to work, we have to set theallowedHeaders
setting withAuthorization
else it throws 401 error.Expected
upstream should've the
allowedHeaders
setting, which should contain the headers which are required to resolve the http call i.e in following case it'sAuthorization
.technical requirements: