Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README: It's like GraphQL, but for Postgres. #2120

Merged
merged 4 commits into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,21 @@
<a href="https://x.com/ElectricSQL" target="_blank"><img src="https://img.shields.io/twitter/follow/ElectricSQL.svg?style=social&label=Follow @ElectricSQL"></a>
</p>

# Electric
# Electric <!-- omit in toc -->

Your Postgres data, in sync, wherever you need it.

**Table of Contents:**

- [Quick links](#quick-links)
- [What is Electric?](#what-is-electric)
- [Getting Started](#getting-started)
- [HTTP API Docs](#http-api-docs)
- [Developing Electric](#developing-electric)
- [Mac setup](#mac-setup)
- [Contributing](#contributing)
- [Support](#support)

## Quick links

- [Quickstart](https://electric-sql.com/docs/quickstart)
Expand All @@ -38,7 +49,7 @@ Your Postgres data, in sync, wherever you need it.

Electric provides an [HTTP API](https://electric-sql.com/docs/api/http) for syncing [Shapes](https://electric-sql.com/docs/guides/shapes) of data from Postgres. This can be used directly or via [client libraries](https://electric-sql.com/docs/api/clients/typescript) and [integrations](https://electric-sql.com/docs/api/integrations/react).

### This looks a bit different than the last time I visited?
### This looks a bit different than the last time I visited? <!-- omit in toc -->

We started a clean rebuild of the sync engine in July 2024. One that's informed by the lessons learned building the [previous system](https://github.com/electric-sql/electric-old). See
[James' blog post for background on the change](https://electric-sql.com/blog/2024/07/17/electric-next).
Expand All @@ -65,15 +76,15 @@ curl -i 'http://localhost:3000/v1/shape?table=foo&offset=-1'
Or use one of the clients or integrations, such as the [`useShape`](https://electric-sql.com/docs/api/integrations/react) React hook:

```jsx
import { useShape } from '@electric-sql/react'
import { useShape } from "@electric-sql/react"

function Component() {
const { data } = useShape({
url: `http://localhost:3000/v1/shape`,
params: {
table: `foo`,
where: `title LIKE 'foo%'`
}
where: `title LIKE 'foo%'`,
},
})

return JSON.stringify(data)
Expand Down