electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.47k stars 156 forks source link

Elixir client cannot point to arbitrary proxy #1992

Closed msfstef closed 3 days ago

msfstef commented 3 days ago

The Elixir client currently hardcodes the path of the shape API to be appended to the base URL provided, which (unless I'm missing something?) makes it impossible to point it to an arbitrary proxy:

https://github.com/electric-sql/electric/blob/f1e7d702e9649160e1e01290dd30e3017bf3b70b/packages/elixir-client/lib/electric/client/fetch/request.ex#L81-L82

Perhaps rather than providing a base URL it should accept the actual endpoint for the shape API itself.

Tagging @magnetised for confirmation

magnetised commented 3 days ago

Good point. I hated making the user know our api endpoint path, seemed fragile and cumbersome, but I see the need for flexibility. Will tackle asap

magnetised commented 3 days ago

@msfstef https://github.com/electric-sql/electric/pull/1994