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: graphile/graphile-cache/README.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,44 +16,42 @@
16
16
</a>
17
17
</p>
18
18
19
-
PostGraphile instance LRU cache with automatic cleanup when PostgreSQL pools are disposed.
19
+
**`graphile-cache`** is an LRU cache for PostGraphile handlers with automatic cleanup when PostgreSQL pools are disposed.
20
20
21
-
## Installation
21
+
> This package integrates with `pg-cache` for PostgreSQL pool management.
22
+
23
+
## 🚀 Installation
22
24
23
25
```bash
24
26
npm install graphile-cache pg-cache
25
27
```
26
28
27
-
Note: This package depends on `pg-cache` for the PostgreSQL pool management.
28
-
29
-
## Features
29
+
## ✨ Features
30
30
31
31
- LRU cache for PostGraphile instances
32
32
- Automatic cleanup when associated PostgreSQL pools are disposed
33
33
- Integrates seamlessly with `pg-cache`
34
34
- Service cache re-exported for convenience
35
35
- TypeScript support
36
36
37
-
## How It Works
37
+
## 🧠 How It Works
38
38
39
39
When you import this package, it automatically registers a cleanup callback with `pg-cache`. When a PostgreSQL pool is disposed, any PostGraphile instances using that pool are automatically removed from the cache.
@@ -173,7 +171,7 @@ Closes all caches including the service cache, graphile cache, and all PostgreSQ
173
171
174
172
Re-exported from `pg-cache` for convenience.
175
173
176
-
## Integration Details
174
+
## 🔌 Integration Details
177
175
178
176
The integration with `pg-cache` happens automatically when this module is imported. The cleanup callback is registered immediately, ensuring that PostGraphile instances are cleaned up whenever their associated PostgreSQL pools are disposed.
Copy file name to clipboardExpand all lines: graphile/graphile-i18n/README.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,22 @@
16
16
</a>
17
17
</p>
18
18
19
-
TypeScript rewrite of the Graphile/PostGraphile i18n plugin. Adds language-aware fields sourced from translation tables declared via smart comments.
19
+
**`graphile-i18n`** is a TypeScript rewrite of the Graphile/PostGraphile i18n plugin. It adds language-aware fields sourced from translation tables declared via smart comments and respects `Accept-Language` with sensible fallbacks.
20
20
21
-
## Install
21
+
## 🚀 Installation
22
22
23
23
```bash
24
24
pnpm add graphile-i18n
25
25
```
26
26
27
-
## Usage
27
+
## ✨ Features
28
+
29
+
- Smart comments (`@i18n`) to wire translation tables
30
+
-`Accept-Language` detection with graceful fallback to base values
31
+
- Works with PostGraphile context via `additionalGraphQLContextFromRequest`
32
+
- TypeScript-first implementation
33
+
34
+
## 📦 Usage
28
35
29
36
1. Add a translation table and tag the base table with `@i18n`:
30
37
@@ -70,12 +77,18 @@ app.use(
70
77
71
78
Requests with `Accept-Language` headers receive the closest translation; fields fall back to the base table values when a translation is missing.
72
79
73
-
## Tests
80
+
## 🧰 Configuration Options
74
81
75
-
Tests run against a real Postgres instance using `graphile-test`:
82
+
All options are provided through `graphileBuildOptions`:
Copy file name to clipboardExpand all lines: graphile/graphile-pg-type-mappings/README.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,22 @@
16
16
</a>
17
17
</p>
18
18
19
-
Custom PostgreSQL typemappings plugin for Graphile/PostGraphile.
19
+
**`graphile-pg-type-mappings`** is a Graphile/PostGraphile plugin that maps custom PostgreSQL types to GraphQL scalars.
20
20
21
-
This plugin provides custom type mappings for PostgreSQL types to GraphQL types, including:
21
+
## 🚀 Installation
22
+
23
+
```bash
24
+
npm install graphile-pg-type-mappings
25
+
```
26
+
27
+
## ✨ Features
28
+
29
+
- Sensible defaults for common custom Postgres types (`email`, `origin`, `multiple_select`, etc.)
30
+
- Override or extend mappings via `customTypeMappings`
31
+
- Works with PostGraphile v4 as a standard plugin
32
+
- TypeScript definitions for mapping configuration
33
+
34
+
### Default mappings
22
35
23
36
-`email` → `String`
24
37
-`hostname` → `String`
@@ -29,13 +42,7 @@ This plugin provides custom type mappings for PostgreSQL types to GraphQL types,
29
42
30
43
> **Note:** If you need PostGIS types (like `geolocation` or `geopolygon` → `GeoJSON`), you can add them via `customTypeMappings` when using the PostGIS plugin.
@@ -59,13 +87,11 @@ Requires `postgraphile@^4.5.0` and the following plugins appended prior to this
59
87
| ~ | geometry | bboxContains |
60
88
|~= | geometry | bboxEquals |
61
89
62
-
## Development
90
+
## 🧑💻 Development
63
91
64
-
To establish a test environment, create an empty PostgreSQL database and set a `TEST_DATABASE_URL` environment variable with your database connection string.
0 commit comments