Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
Object.fromEntries
to convert Headers
into a plain object.
As helpfully debugged and identified by @dsanders11 (Thank you!), this was a mistake in my original implementation that incorrectly spread the iterable `Headers` into the `headers` object of the response. While I would have loved to create a regression test for this, there was no place which was currently wired up to support handler specific options (like `cors`), which is sometimes on the top-level constructor to `ApolloServer`, and sometimes on `createHandler` or `applyMiddleware`. I did try to futz with it for a full hour to no avail. I'm already aware of a number of limitations with the current so-called `integration-testsuite`, and I'm putting that on the list of things to address in an upcoming overhaul of that testing infra. That said, I've manually tested this and I think it's working properly. An upcoming release should hopefully confirm that. Ref: https://github.com/apollographql/apollo-server/pull/2674/files#r288053103 Ref: #2718 (comment)
- Loading branch information