apollographql / apollographql/apollo-tooling

"is not a legal HTTP header name"

Open
#2,333 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

**Intended outcome:**

```shell
npx apollo service:download \
--endpoint=https://asdf.url/graphql \
--header="X-APP-TOKEN: asdf" \
--header="X-AUTH-TOKEN: asdf" \
graphql-schema.json
```

should download the schema

**Actual outcome:**

```
✔ Loading Apollo Project
✖ Saving schema to schema.json
→ TypeError: is not a legal HTTP header name
Error: TypeError: is not a legal HTTP header name
```

**How to reproduce the issue:**

run code above ↑

**Versions**

`apollo/2.33.2 darwin-x64 node-v16.0.0`

Contributor guide

Open the contributing guide

Research direction

Start with the Apollo CLI service:download entry point and reproduce the command using the two --header options shown in the issue. Trace how those options are parsed and passed into the HTTP request, then verify that the schema downloads successfully without the illegal-header-name error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.