You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/postgres/README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Grafbase Postgres Extension
1
+
# Postgres extension
2
2
3
-
This Postgres extension for the Grafbase Gateway acts as a complete virtual subgraph that you can compose into your federated schema.
3
+
This extension allows you to integrate Postgres databases into your federated graph declaratively with GraphQL directives.
4
4
5
-
Use the [`grafbase-postgres`](https://github.com/grafbase/extensions/tree/julius/ywmxqwoumunr/cli/postgres) introspection tool to generate a subgraph schema from your Postgres database. You can then compose this subgraph into your federated schema. Commit the generated schema to your repository and re-introspect the database periodically to keep the schema up-to-date.
5
+
Use the [`grafbase-postgres`](https://github.com/grafbase/extensions/tree/main/cli/postgres) introspection tool to generate a subgraph schema from your Postgres database. You can then compose this subgraph into your federated schema. Commit the generated schema to your repository and re-introspect the database periodically to keep the schema up-to-date.
6
6
7
7
The introspection process generates a complete set of types representing the data in your Postgres database, including entities, relationships, and scalar fields. Use these types to query and mutate data in your Postgres database via the Grafbase Gateway.
8
8
@@ -18,11 +18,11 @@ Generally, every operation executed through the extension generates exactly one
18
18
19
19
### Introspection Tool (`grafbase-postgres`)
20
20
21
-
Currently, you must compile the `grafbase-postgres` introspection tool from source (refer to its [repository](https://github.com/grafbase/extensions/tree/julius/ywmxqwoumunr/cli/postgres) for instructions). After successful compilation, copy the resulting binary to a directory in your system's `PATH`.
21
+
Currently, you must compile the `grafbase-postgres` introspection tool from source (refer to its [repository](https://github.com/grafbase/extensions/tree/main/cli/postgres) for instructions). After successful compilation, copy the resulting binary to a directory in your system's `PATH`.
22
22
23
23
*Future versions will offer easier installation, likely integrated with the Grafbase CLI.*
24
24
25
-
### Building the Extension (Wasm)
25
+
### Building the Extension
26
26
27
27
To use the extension with the Grafbase Gateway, you first need to build the Wasm component.
28
28
@@ -39,14 +39,14 @@ To use the extension with the Grafbase Gateway, you first need to build the Wasm
39
39
40
40
### Gateway Configuration
41
41
42
-
Configure your Grafbase Gateway to use the extension in your `grafbase.config.toml`.
42
+
Configure your Grafbase Gateway to use the extension in your `grafbase.toml` configuration file.
43
43
44
-
**Using a Published Version (Recommended when available):**
44
+
**Using a Published Version:**
45
45
46
-
Specify the desired version (replace `0.1` when newer versions are released):
46
+
Specify the desired version of the Postgres extension:
47
47
48
48
```toml
49
-
# grafbase.config.toml
49
+
# grafbase.toml
50
50
[extensions.postgres]
51
51
version = "0.1"
52
52
```
@@ -56,7 +56,7 @@ version = "0.1"
56
56
If you built the extension manually, point the gateway to the build directory:
57
57
58
58
```toml
59
-
# grafbase.config.toml
59
+
# grafbase.toml
60
60
[extensions.postgres]
61
61
path = "/path/to/your/build"# Update this path
62
62
```
@@ -102,10 +102,10 @@ PREBUILT_EXTENSION=1 cargo test
102
102
103
103
## Configuration
104
104
105
-
Configure the Postgres extension within your `grafbase.config.toml` under the `[extensions.postgres.config]` section. See the [Grafbase Gateway configuration documentation](https://grafbase.com/docs/reference/gateway/configuration/extensions) for general extension configuration details.
105
+
Configure the Postgres extension within your `grafbase.toml` under the `[extensions.postgres.config]` section. See the [Grafbase Gateway configuration documentation](https://grafbase.com/docs/reference/gateway/configuration/extensions) for general extension configuration details.
106
106
107
107
```toml
108
-
# Example configuration within grafbase.config.toml
108
+
# Example configuration within grafbase.toml
109
109
[extensions.postgres]
110
110
# version = "0.1" # Or path = "..."
111
111
@@ -132,7 +132,7 @@ max_lifetime_ms = 1800000
132
132
133
133
## Introspection
134
134
135
-
Use the `grafbase-postgres introspect` command to generate a GraphQL schema definition (SDL) from your database:
135
+
Use the `grafbase-postgres introspect` command to generate a GraphQL schema from your database:
136
136
137
137
```bash
138
138
# Ensure grafbase-postgres is in your PATH
@@ -294,6 +294,6 @@ type Mutation {
294
294
* **Returning Data:** All mutations support a `returning` selection set, allowing you to fetch data about the affected rows within the same database transaction.
295
295
* **Performance:** Each mutation executes as a single SQL statement.
296
296
297
-
### Supported PostgreSQL Versions
297
+
### Supported Postgres Versions
298
298
299
-
We primarily test against the latest stable PostgreSQL version. The extension relies on SQL features, particularly JSON/JSONB functions, available in PostgreSQL. Therefore, the minimum supported version is **PostgreSQL 9.4**.
299
+
We primarily test against the latest stable Postgres version. The extension relies on SQL features, particularly JSON/JSONB functions, available in Postgres. Therefore, the minimum supported version is **Postgres 9.4**.
0 commit comments