graphile-settings 4.4.0 → 4.6.0
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/esm/plugins/index.d.ts +4 -1
- package/esm/plugins/index.js +4 -2
- package/esm/presets/constructive-preset.d.ts +4 -0
- package/esm/presets/constructive-preset.js +10 -1
- package/package.json +9 -8
- package/plugins/index.d.ts +4 -1
- package/plugins/index.js +11 -2
- package/presets/constructive-preset.d.ts +4 -0
- package/presets/constructive-preset.js +9 -0
package/esm/plugins/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { MinimalPreset, InflektPlugin, InflektPreset, CustomInflectorPlugin, CustomInflectorPreset, ConflictDetectorPlugin, ConflictDetectorPreset, InflectorLoggerPlugin, InflectorLoggerPreset, EnableAllFilterColumnsPlugin, EnableAllFilterColumnsPreset, ManyToManyOptInPlugin, ManyToManyOptInPreset, createUniqueLookupPlugin, PrimaryKeyOnlyPlugin, NoUniqueLookupPlugin, PrimaryKeyOnlyPreset, NoUniqueLookupPreset, MetaSchemaPlugin, MetaSchemaPreset, PgTypeMappingsPlugin, PgTypeMappingsPreset, PublicKeySignature, _cachedTablesMeta, _pgTypeToGqlType, _buildFieldMeta, } from 'graphile-misc-plugins';
|
|
8
8
|
export type { UniqueLookupOptions, TypeMapping, PublicKeyChallengeConfig } from 'graphile-misc-plugins';
|
|
9
|
-
export { VectorCodecPlugin, VectorCodecPreset } from 'graphile-pgvector-plugin';
|
|
9
|
+
export { VectorCodecPlugin, VectorCodecPreset, VectorSearchPlugin, createVectorSearchPlugin } from 'graphile-pgvector-plugin';
|
|
10
|
+
export type { VectorSearchPluginOptions, VectorMetric } from 'graphile-pgvector-plugin';
|
|
10
11
|
export { PgSearchPlugin, PgSearchPreset, createPgSearchPlugin, TsvectorCodecPlugin, TsvectorCodecPreset, } from 'graphile-search-plugin';
|
|
11
12
|
export type { PgSearchPluginOptions } from 'graphile-search-plugin';
|
|
13
|
+
export { Bm25CodecPlugin, Bm25CodecPreset, Bm25SearchPlugin, createBm25SearchPlugin, Bm25SearchPreset, } from 'graphile-pg-textsearch-plugin';
|
|
14
|
+
export type { Bm25SearchPluginOptions, Bm25IndexInfo } from 'graphile-pg-textsearch-plugin';
|
package/esm/plugins/index.js
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Re-export all plugins from graphile-misc-plugins
|
|
8
8
|
export { MinimalPreset, InflektPlugin, InflektPreset, CustomInflectorPlugin, CustomInflectorPreset, ConflictDetectorPlugin, ConflictDetectorPreset, InflectorLoggerPlugin, InflectorLoggerPreset, EnableAllFilterColumnsPlugin, EnableAllFilterColumnsPreset, ManyToManyOptInPlugin, ManyToManyOptInPreset, createUniqueLookupPlugin, PrimaryKeyOnlyPlugin, NoUniqueLookupPlugin, PrimaryKeyOnlyPreset, NoUniqueLookupPreset, MetaSchemaPlugin, MetaSchemaPreset, PgTypeMappingsPlugin, PgTypeMappingsPreset, PublicKeySignature, _cachedTablesMeta, _pgTypeToGqlType, _buildFieldMeta, } from 'graphile-misc-plugins';
|
|
9
|
-
// pgvector — Vector scalar + codec
|
|
10
|
-
export { VectorCodecPlugin, VectorCodecPreset } from 'graphile-pgvector-plugin';
|
|
9
|
+
// pgvector — Vector scalar + codec + auto-discovered search/filter/orderBy
|
|
10
|
+
export { VectorCodecPlugin, VectorCodecPreset, VectorSearchPlugin, createVectorSearchPlugin } from 'graphile-pgvector-plugin';
|
|
11
11
|
// Search plugin (stays in graphile-search-plugin, re-exported here for convenience)
|
|
12
12
|
export { PgSearchPlugin, PgSearchPreset, createPgSearchPlugin, TsvectorCodecPlugin, TsvectorCodecPreset, } from 'graphile-search-plugin';
|
|
13
|
+
// pg_textsearch — BM25 ranked search (auto-discovers BM25 indexes)
|
|
14
|
+
export { Bm25CodecPlugin, Bm25CodecPreset, Bm25SearchPlugin, createBm25SearchPlugin, Bm25SearchPreset, } from 'graphile-pg-textsearch-plugin';
|
|
@@ -19,6 +19,10 @@ import type { GraphileConfig } from 'graphile-config';
|
|
|
19
19
|
* - Upload plugin (file upload to S3/MinIO for image, upload, attachment domain columns)
|
|
20
20
|
* - SQL expression validator (validates @sqlExpression columns in mutations)
|
|
21
21
|
* - PG type mappings (maps custom types like email, url to GraphQL scalars)
|
|
22
|
+
* - pgvector search (auto-discovers vector columns: condition fields, distance computed fields,
|
|
23
|
+
* orderBy distance — zero config)
|
|
24
|
+
* - pg_textsearch BM25 search (auto-discovers BM25 indexes: condition fields, score computed fields,
|
|
25
|
+
* orderBy score — zero config)
|
|
22
26
|
*
|
|
23
27
|
* DISABLED PLUGINS:
|
|
24
28
|
* - PgConnectionArgFilterBackwardRelationsPlugin (relation filters bloat the API)
|
|
@@ -2,7 +2,8 @@ import { PostGraphileConnectionFilterPreset } from 'postgraphile-plugin-connecti
|
|
|
2
2
|
import { MinimalPreset, InflektPreset, ConflictDetectorPreset, InflectorLoggerPreset, NoUniqueLookupPreset, EnableAllFilterColumnsPreset, ManyToManyOptInPreset, MetaSchemaPreset, PgTypeMappingsPreset, } from 'graphile-misc-plugins';
|
|
3
3
|
import { PgSearchPreset } from 'graphile-search-plugin';
|
|
4
4
|
import { GraphilePostgisPreset } from 'graphile-postgis';
|
|
5
|
-
import { VectorCodecPreset } from 'graphile-pgvector-plugin';
|
|
5
|
+
import { VectorCodecPreset, createVectorSearchPlugin } from 'graphile-pgvector-plugin';
|
|
6
|
+
import { Bm25SearchPreset } from 'graphile-pg-textsearch-plugin';
|
|
6
7
|
import { PostgisConnectionFilterPreset } from 'graphile-plugin-connection-filter-postgis';
|
|
7
8
|
import { UploadPreset } from 'graphile-upload-plugin';
|
|
8
9
|
import { SqlExpressionValidatorPreset } from 'graphile-sql-expression-validator';
|
|
@@ -27,6 +28,10 @@ import { constructiveUploadFieldDefinitions } from '../upload-resolver';
|
|
|
27
28
|
* - Upload plugin (file upload to S3/MinIO for image, upload, attachment domain columns)
|
|
28
29
|
* - SQL expression validator (validates @sqlExpression columns in mutations)
|
|
29
30
|
* - PG type mappings (maps custom types like email, url to GraphQL scalars)
|
|
31
|
+
* - pgvector search (auto-discovers vector columns: condition fields, distance computed fields,
|
|
32
|
+
* orderBy distance — zero config)
|
|
33
|
+
* - pg_textsearch BM25 search (auto-discovers BM25 indexes: condition fields, score computed fields,
|
|
34
|
+
* orderBy score — zero config)
|
|
30
35
|
*
|
|
31
36
|
* DISABLED PLUGINS:
|
|
32
37
|
* - PgConnectionArgFilterBackwardRelationsPlugin (relation filters bloat the API)
|
|
@@ -62,6 +67,10 @@ export const ConstructivePreset = {
|
|
|
62
67
|
PgSearchPreset({ pgSearchPrefix: 'fullText' }),
|
|
63
68
|
GraphilePostgisPreset,
|
|
64
69
|
VectorCodecPreset,
|
|
70
|
+
{
|
|
71
|
+
plugins: [createVectorSearchPlugin()],
|
|
72
|
+
},
|
|
73
|
+
Bm25SearchPreset(),
|
|
65
74
|
PostgisConnectionFilterPreset,
|
|
66
75
|
UploadPreset({
|
|
67
76
|
uploadFieldDefinitions: constructiveUploadFieldDefinitions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-settings",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "graphile settings",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test:watch": "jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@constructive-io/graphql-env": "^3.2.
|
|
33
|
-
"@constructive-io/graphql-types": "^3.1.
|
|
32
|
+
"@constructive-io/graphql-env": "^3.2.2",
|
|
33
|
+
"@constructive-io/graphql-types": "^3.1.2",
|
|
34
34
|
"@constructive-io/s3-streamer": "^2.14.0",
|
|
35
35
|
"@constructive-io/upload-names": "^2.7.0",
|
|
36
36
|
"@dataplan/json": "1.0.0-rc.5",
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
"graphile-build-pg": "5.0.0-rc.5",
|
|
47
47
|
"graphile-config": "1.0.0-rc.5",
|
|
48
48
|
"graphile-misc-plugins": "^1.1.1",
|
|
49
|
-
"graphile-
|
|
50
|
-
"graphile-plugin
|
|
51
|
-
"graphile-postgis": "^2.
|
|
52
|
-
"graphile-
|
|
49
|
+
"graphile-pg-textsearch-plugin": "^1.1.0",
|
|
50
|
+
"graphile-pgvector-plugin": "^1.3.0",
|
|
51
|
+
"graphile-plugin-connection-filter-postgis": "^2.3.1",
|
|
52
|
+
"graphile-postgis": "^2.3.1",
|
|
53
|
+
"graphile-search-plugin": "^3.3.1",
|
|
53
54
|
"graphile-sql-expression-validator": "^2.2.1",
|
|
54
55
|
"graphile-upload-plugin": "^2.2.1",
|
|
55
56
|
"graphql": "^16.9.0",
|
|
@@ -78,5 +79,5 @@
|
|
|
78
79
|
"constructive",
|
|
79
80
|
"graphql"
|
|
80
81
|
],
|
|
81
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "1c9efe4ecd5a6b8daa14fe42214ecf8c5b664198"
|
|
82
83
|
}
|
package/plugins/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { MinimalPreset, InflektPlugin, InflektPreset, CustomInflectorPlugin, CustomInflectorPreset, ConflictDetectorPlugin, ConflictDetectorPreset, InflectorLoggerPlugin, InflectorLoggerPreset, EnableAllFilterColumnsPlugin, EnableAllFilterColumnsPreset, ManyToManyOptInPlugin, ManyToManyOptInPreset, createUniqueLookupPlugin, PrimaryKeyOnlyPlugin, NoUniqueLookupPlugin, PrimaryKeyOnlyPreset, NoUniqueLookupPreset, MetaSchemaPlugin, MetaSchemaPreset, PgTypeMappingsPlugin, PgTypeMappingsPreset, PublicKeySignature, _cachedTablesMeta, _pgTypeToGqlType, _buildFieldMeta, } from 'graphile-misc-plugins';
|
|
8
8
|
export type { UniqueLookupOptions, TypeMapping, PublicKeyChallengeConfig } from 'graphile-misc-plugins';
|
|
9
|
-
export { VectorCodecPlugin, VectorCodecPreset } from 'graphile-pgvector-plugin';
|
|
9
|
+
export { VectorCodecPlugin, VectorCodecPreset, VectorSearchPlugin, createVectorSearchPlugin } from 'graphile-pgvector-plugin';
|
|
10
|
+
export type { VectorSearchPluginOptions, VectorMetric } from 'graphile-pgvector-plugin';
|
|
10
11
|
export { PgSearchPlugin, PgSearchPreset, createPgSearchPlugin, TsvectorCodecPlugin, TsvectorCodecPreset, } from 'graphile-search-plugin';
|
|
11
12
|
export type { PgSearchPluginOptions } from 'graphile-search-plugin';
|
|
13
|
+
export { Bm25CodecPlugin, Bm25CodecPreset, Bm25SearchPlugin, createBm25SearchPlugin, Bm25SearchPreset, } from 'graphile-pg-textsearch-plugin';
|
|
14
|
+
export type { Bm25SearchPluginOptions, Bm25IndexInfo } from 'graphile-pg-textsearch-plugin';
|
package/plugins/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Plugin implementations have been moved to graphile-misc-plugins.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.TsvectorCodecPreset = exports.TsvectorCodecPlugin = exports.createPgSearchPlugin = exports.PgSearchPreset = exports.PgSearchPlugin = exports.VectorCodecPreset = exports.VectorCodecPlugin = exports._buildFieldMeta = exports._pgTypeToGqlType = exports._cachedTablesMeta = exports.PublicKeySignature = exports.PgTypeMappingsPreset = exports.PgTypeMappingsPlugin = exports.MetaSchemaPreset = exports.MetaSchemaPlugin = exports.NoUniqueLookupPreset = exports.PrimaryKeyOnlyPreset = exports.NoUniqueLookupPlugin = exports.PrimaryKeyOnlyPlugin = exports.createUniqueLookupPlugin = exports.ManyToManyOptInPreset = exports.ManyToManyOptInPlugin = exports.EnableAllFilterColumnsPreset = exports.EnableAllFilterColumnsPlugin = exports.InflectorLoggerPreset = exports.InflectorLoggerPlugin = exports.ConflictDetectorPreset = exports.ConflictDetectorPlugin = exports.CustomInflectorPreset = exports.CustomInflectorPlugin = exports.InflektPreset = exports.InflektPlugin = exports.MinimalPreset = void 0;
|
|
9
|
+
exports.Bm25SearchPreset = exports.createBm25SearchPlugin = exports.Bm25SearchPlugin = exports.Bm25CodecPreset = exports.Bm25CodecPlugin = exports.TsvectorCodecPreset = exports.TsvectorCodecPlugin = exports.createPgSearchPlugin = exports.PgSearchPreset = exports.PgSearchPlugin = exports.createVectorSearchPlugin = exports.VectorSearchPlugin = exports.VectorCodecPreset = exports.VectorCodecPlugin = exports._buildFieldMeta = exports._pgTypeToGqlType = exports._cachedTablesMeta = exports.PublicKeySignature = exports.PgTypeMappingsPreset = exports.PgTypeMappingsPlugin = exports.MetaSchemaPreset = exports.MetaSchemaPlugin = exports.NoUniqueLookupPreset = exports.PrimaryKeyOnlyPreset = exports.NoUniqueLookupPlugin = exports.PrimaryKeyOnlyPlugin = exports.createUniqueLookupPlugin = exports.ManyToManyOptInPreset = exports.ManyToManyOptInPlugin = exports.EnableAllFilterColumnsPreset = exports.EnableAllFilterColumnsPlugin = exports.InflectorLoggerPreset = exports.InflectorLoggerPlugin = exports.ConflictDetectorPreset = exports.ConflictDetectorPlugin = exports.CustomInflectorPreset = exports.CustomInflectorPlugin = exports.InflektPreset = exports.InflektPlugin = exports.MinimalPreset = void 0;
|
|
10
10
|
// Re-export all plugins from graphile-misc-plugins
|
|
11
11
|
var graphile_misc_plugins_1 = require("graphile-misc-plugins");
|
|
12
12
|
Object.defineProperty(exports, "MinimalPreset", { enumerable: true, get: function () { return graphile_misc_plugins_1.MinimalPreset; } });
|
|
@@ -35,10 +35,12 @@ Object.defineProperty(exports, "PublicKeySignature", { enumerable: true, get: fu
|
|
|
35
35
|
Object.defineProperty(exports, "_cachedTablesMeta", { enumerable: true, get: function () { return graphile_misc_plugins_1._cachedTablesMeta; } });
|
|
36
36
|
Object.defineProperty(exports, "_pgTypeToGqlType", { enumerable: true, get: function () { return graphile_misc_plugins_1._pgTypeToGqlType; } });
|
|
37
37
|
Object.defineProperty(exports, "_buildFieldMeta", { enumerable: true, get: function () { return graphile_misc_plugins_1._buildFieldMeta; } });
|
|
38
|
-
// pgvector — Vector scalar + codec
|
|
38
|
+
// pgvector — Vector scalar + codec + auto-discovered search/filter/orderBy
|
|
39
39
|
var graphile_pgvector_plugin_1 = require("graphile-pgvector-plugin");
|
|
40
40
|
Object.defineProperty(exports, "VectorCodecPlugin", { enumerable: true, get: function () { return graphile_pgvector_plugin_1.VectorCodecPlugin; } });
|
|
41
41
|
Object.defineProperty(exports, "VectorCodecPreset", { enumerable: true, get: function () { return graphile_pgvector_plugin_1.VectorCodecPreset; } });
|
|
42
|
+
Object.defineProperty(exports, "VectorSearchPlugin", { enumerable: true, get: function () { return graphile_pgvector_plugin_1.VectorSearchPlugin; } });
|
|
43
|
+
Object.defineProperty(exports, "createVectorSearchPlugin", { enumerable: true, get: function () { return graphile_pgvector_plugin_1.createVectorSearchPlugin; } });
|
|
42
44
|
// Search plugin (stays in graphile-search-plugin, re-exported here for convenience)
|
|
43
45
|
var graphile_search_plugin_1 = require("graphile-search-plugin");
|
|
44
46
|
Object.defineProperty(exports, "PgSearchPlugin", { enumerable: true, get: function () { return graphile_search_plugin_1.PgSearchPlugin; } });
|
|
@@ -46,3 +48,10 @@ Object.defineProperty(exports, "PgSearchPreset", { enumerable: true, get: functi
|
|
|
46
48
|
Object.defineProperty(exports, "createPgSearchPlugin", { enumerable: true, get: function () { return graphile_search_plugin_1.createPgSearchPlugin; } });
|
|
47
49
|
Object.defineProperty(exports, "TsvectorCodecPlugin", { enumerable: true, get: function () { return graphile_search_plugin_1.TsvectorCodecPlugin; } });
|
|
48
50
|
Object.defineProperty(exports, "TsvectorCodecPreset", { enumerable: true, get: function () { return graphile_search_plugin_1.TsvectorCodecPreset; } });
|
|
51
|
+
// pg_textsearch — BM25 ranked search (auto-discovers BM25 indexes)
|
|
52
|
+
var graphile_pg_textsearch_plugin_1 = require("graphile-pg-textsearch-plugin");
|
|
53
|
+
Object.defineProperty(exports, "Bm25CodecPlugin", { enumerable: true, get: function () { return graphile_pg_textsearch_plugin_1.Bm25CodecPlugin; } });
|
|
54
|
+
Object.defineProperty(exports, "Bm25CodecPreset", { enumerable: true, get: function () { return graphile_pg_textsearch_plugin_1.Bm25CodecPreset; } });
|
|
55
|
+
Object.defineProperty(exports, "Bm25SearchPlugin", { enumerable: true, get: function () { return graphile_pg_textsearch_plugin_1.Bm25SearchPlugin; } });
|
|
56
|
+
Object.defineProperty(exports, "createBm25SearchPlugin", { enumerable: true, get: function () { return graphile_pg_textsearch_plugin_1.createBm25SearchPlugin; } });
|
|
57
|
+
Object.defineProperty(exports, "Bm25SearchPreset", { enumerable: true, get: function () { return graphile_pg_textsearch_plugin_1.Bm25SearchPreset; } });
|
|
@@ -19,6 +19,10 @@ import type { GraphileConfig } from 'graphile-config';
|
|
|
19
19
|
* - Upload plugin (file upload to S3/MinIO for image, upload, attachment domain columns)
|
|
20
20
|
* - SQL expression validator (validates @sqlExpression columns in mutations)
|
|
21
21
|
* - PG type mappings (maps custom types like email, url to GraphQL scalars)
|
|
22
|
+
* - pgvector search (auto-discovers vector columns: condition fields, distance computed fields,
|
|
23
|
+
* orderBy distance — zero config)
|
|
24
|
+
* - pg_textsearch BM25 search (auto-discovers BM25 indexes: condition fields, score computed fields,
|
|
25
|
+
* orderBy score — zero config)
|
|
22
26
|
*
|
|
23
27
|
* DISABLED PLUGINS:
|
|
24
28
|
* - PgConnectionArgFilterBackwardRelationsPlugin (relation filters bloat the API)
|
|
@@ -6,6 +6,7 @@ const graphile_misc_plugins_1 = require("graphile-misc-plugins");
|
|
|
6
6
|
const graphile_search_plugin_1 = require("graphile-search-plugin");
|
|
7
7
|
const graphile_postgis_1 = require("graphile-postgis");
|
|
8
8
|
const graphile_pgvector_plugin_1 = require("graphile-pgvector-plugin");
|
|
9
|
+
const graphile_pg_textsearch_plugin_1 = require("graphile-pg-textsearch-plugin");
|
|
9
10
|
const graphile_plugin_connection_filter_postgis_1 = require("graphile-plugin-connection-filter-postgis");
|
|
10
11
|
const graphile_upload_plugin_1 = require("graphile-upload-plugin");
|
|
11
12
|
const graphile_sql_expression_validator_1 = require("graphile-sql-expression-validator");
|
|
@@ -30,6 +31,10 @@ const upload_resolver_1 = require("../upload-resolver");
|
|
|
30
31
|
* - Upload plugin (file upload to S3/MinIO for image, upload, attachment domain columns)
|
|
31
32
|
* - SQL expression validator (validates @sqlExpression columns in mutations)
|
|
32
33
|
* - PG type mappings (maps custom types like email, url to GraphQL scalars)
|
|
34
|
+
* - pgvector search (auto-discovers vector columns: condition fields, distance computed fields,
|
|
35
|
+
* orderBy distance — zero config)
|
|
36
|
+
* - pg_textsearch BM25 search (auto-discovers BM25 indexes: condition fields, score computed fields,
|
|
37
|
+
* orderBy score — zero config)
|
|
33
38
|
*
|
|
34
39
|
* DISABLED PLUGINS:
|
|
35
40
|
* - PgConnectionArgFilterBackwardRelationsPlugin (relation filters bloat the API)
|
|
@@ -65,6 +70,10 @@ exports.ConstructivePreset = {
|
|
|
65
70
|
(0, graphile_search_plugin_1.PgSearchPreset)({ pgSearchPrefix: 'fullText' }),
|
|
66
71
|
graphile_postgis_1.GraphilePostgisPreset,
|
|
67
72
|
graphile_pgvector_plugin_1.VectorCodecPreset,
|
|
73
|
+
{
|
|
74
|
+
plugins: [(0, graphile_pgvector_plugin_1.createVectorSearchPlugin)()],
|
|
75
|
+
},
|
|
76
|
+
(0, graphile_pg_textsearch_plugin_1.Bm25SearchPreset)(),
|
|
68
77
|
graphile_plugin_connection_filter_postgis_1.PostgisConnectionFilterPreset,
|
|
69
78
|
(0, graphile_upload_plugin_1.UploadPreset)({
|
|
70
79
|
uploadFieldDefinitions: upload_resolver_1.constructiveUploadFieldDefinitions,
|