[relay-compiler] Local persist does not delete old versions of query
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
I recently set up local persisted queries and noticed that subsequent updates seem to be additive vs replacing the existing queries in the persisted config
Example:
If i have a `TestQuery` which gets saved in the persisted config as
```
"12345": "query TestQuery..."
```
and i later make a change to `TestQuery` and rerun relay-compiler, my json file will look like:
```
"12345": "query TestQuery...", <-- this is the old version of my query
"23456": "query TestQuery..." <-- this is the new version of my query
```
The only way I've found to generate a "fresh" copy of the json file is to first delete the json file and then run relay compiler with the `--repersist` flag.
Wanted to validate if this is expected behavior or not (could not find anything in the docs or source code to confirm this).
Thanks in advance!
Contributor guide
Assessment
This issue has not been assessed yet.