apollographql / apollographql/apollo-tooling
Different downloaded SDL schema files with unchanged remote schema
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
**Intended outcome:**
When performing the `client:download-schema` multiple times on the same URL (with no changes to the schema) there shouldn’t be changes to the downloaded file. This has been true with version 2.22.1 (and previous versions) but is NOT with version 2.30.2.
I’m downloading the schema using SDL format.
**Actual outcome:**
With version 2.30.2, if I perform the command multiple times, I get a different file (content order is changed) so I have git diffs even if the remote schema isn’t changed
**How to reproduce the issue:**
Using Apollo `2.30.2`
1 - Perform the command `client:download-schema` to download a schema from a remote URL
2 - Commit the downloaded file
3 - Repeat step 1
4 - Although the remote schema hasn't changed, the downloaded file is different from the one committed in step 2
When using a previous version (es `2.22.1`) the downloaded file is the same if the remote schema hasn't be changed.
**Versions**
2.32.2
Contributor guide
Research direction
Start with the client:download-schema command and compare its SDL output between Apollo versions 2.22.1 and 2.30.2/2.32.2. Reproduce repeated downloads from an unchanged remote URL, then inspect the generated files for nondeterministic content ordering. Done means repeated downloads produce identical SDL files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100