graphile-i18n 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -145,21 +145,34 @@ When the requested language has no translation, the plugin falls back through th
|
|
|
145
145
|
|
|
146
146
|
## Constructive Integration
|
|
147
147
|
|
|
148
|
-
When used with the Constructive framework, the `DataI18n` node type automates translation table creation:
|
|
148
|
+
When used with the Constructive framework, the `DataI18n` node type automates translation table creation and optionally composes with `SearchFullText` for multilingual full-text search:
|
|
149
149
|
|
|
150
150
|
```json
|
|
151
151
|
{
|
|
152
152
|
"nodes": [
|
|
153
153
|
{
|
|
154
154
|
"$type": "DataI18n",
|
|
155
|
-
"data": {
|
|
155
|
+
"data": {
|
|
156
|
+
"fields": ["name", "description"],
|
|
157
|
+
"search": {
|
|
158
|
+
"field_name": "search",
|
|
159
|
+
"source_fields": [
|
|
160
|
+
{ "field": "name", "weight": "A" },
|
|
161
|
+
{ "field": "description", "weight": "B" }
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
156
165
|
}
|
|
157
166
|
]
|
|
158
167
|
}
|
|
159
168
|
```
|
|
160
169
|
|
|
170
|
+
When `search` is provided, the tsvector is created on the **translations table** with dynamic per-row language stemming — each row is stemmed using its own `lang_code` value (e.g., `'spanish'` → Spanish stemmer, `'french'` → French stemmer). PostgreSQL ships with 30+ built-in text search configurations, so multilingual search works out of the box with no per-language configuration.
|
|
171
|
+
|
|
161
172
|
The `i18n_module` provides app-level configuration via `app_settings_i18n` with supported languages, default language, and fallback chain — all manageable via GraphQL mutations.
|
|
162
173
|
|
|
174
|
+
For the full i18n guide (blueprint patterns, ORM queries, SQL search examples), see the [constructive-sdk-i18n skill](https://github.com/constructive-io/constructive-skills/tree/main/.agents/skills/constructive-sdk-i18n).
|
|
175
|
+
|
|
163
176
|
---
|
|
164
177
|
|
|
165
178
|
## Education and Tutorials
|
|
@@ -208,6 +221,10 @@ Common issues and solutions for pgpm, PostgreSQL, and testing.
|
|
|
208
221
|
* [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
|
|
209
222
|
* [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
|
|
210
223
|
|
|
224
|
+
### 📚 Documentation & Skills
|
|
225
|
+
|
|
226
|
+
* [constructive-skills](https://github.com/constructive-io/constructive-skills): **📖 Platform documentation and AI agent skills** — feature catalog, blueprint reference, SDK guides (i18n, billing, limits, events, uploads, security, entities, search, AI), and deployment guides.
|
|
227
|
+
|
|
211
228
|
## Credits
|
|
212
229
|
|
|
213
230
|
**🛠 Built by the [Constructive](https://constructive.io) team — creators of modular Postgres tooling for secure, composable backends. If you like our work, contribute on [GitHub](https://github.com/constructive-io).**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-i18n",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "PostGraphile v5 i18n plugin — language-aware fields from @i18n translation tables with Accept-Language negotiation and fallback chains",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"homepage": "https://github.com/constructive-io/constructive",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"accept-language",
|
|
64
64
|
"locale"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "025f9c4283cf3629e8d74f87ee699b375293c81d"
|
|
67
67
|
}
|