electric-sql / electric-sql/pglite
[BUG]: syncShapesToTables weird behaviour
- Dominant language
- TypeScript
- Stars
- 16k
- Forks
- 442
- Avg merge
- 20h 19m
- Merged PRs (30d)
- 7
Description
**Describe the bug**
See: https://github.com/electric-sql/pglite/issues/888#issue-3907347969.
I closed it and do not have the permissions to reopen.
This seems to be caused by the caching of shape requests.
Using a manipulated fetchClient (https://electric-sql.com/docs/api/clients/typescript#options) seems to solve (?) the issue:
```javascript
const noCacheFetch: typeof fetch = (input, init) =>
fetch(input, { ...init, cache: 'no-store' })
```
I'm pretty sure this is not a good idea though.
It seems this is expected behaviour, see: https://github.com/electric-sql/electric/issues/2995#issuecomment-3193752736. But if so, maybe the docs should be more explicit? Most probably though I have just not understood how to do this correctly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.