apollographql / apollographql/apollo-tooling
apollo:client download-schema Add a flag to skip __ validation to be backward compatible with apollo codegen
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
We are in the process of moving our type generation process from codegen to cli. Our existing schema has __ in our fields. We worked around this by running introspect-schema using codegen replacing __ and generate the types from the schema.json without the __. The codegen introspect-schema used to work even if the schema had __. Trying the same thing with cli throws an error "Name "__metadata" must not begin with "__", which is reserved by GraphQL introspection" when running the download-schema command. I couldn't find a way to skip this validation. Can we add a flag to skip this validation to be compatible with the codegen behaviour?
Contributor guide
Research direction
Start at the download-schema command and trace where the "Name must not begin with __" validation error is raised. Check existing command options and validation tests, if present; done means an explicit flag skips this validation for legacy schemas while the default behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100