graphile-settings 4.13.3 → 4.15.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.
|
@@ -12,12 +12,13 @@ export function buildBelongsToRelations(codec, attributes, uniques, relations, c
|
|
|
12
12
|
continue;
|
|
13
13
|
const localAttributes = relation.localAttributes || [];
|
|
14
14
|
const isUnique = uniques.some((unique) => sameAttributes(unique.attributes, localAttributes));
|
|
15
|
+
const remoteCodec = relation.remoteResource?.codec;
|
|
15
16
|
belongsTo.push({
|
|
16
17
|
fieldName: relationName,
|
|
17
18
|
isUnique,
|
|
18
|
-
type:
|
|
19
|
+
type: remoteCodec?.name || null,
|
|
19
20
|
keys: buildFieldList(localAttributes, codec, attributes, context),
|
|
20
|
-
references: { name:
|
|
21
|
+
references: { name: remoteCodec?.name || 'unknown' },
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
return belongsTo;
|
|
@@ -31,12 +32,13 @@ export function buildReverseRelations(codec, attributes, relations, context) {
|
|
|
31
32
|
const remoteUniques = getUniques(relation.remoteResource || {});
|
|
32
33
|
const remoteAttributes = relation.remoteAttributes || [];
|
|
33
34
|
const isUnique = remoteUniques.some((unique) => sameAttributes(unique.attributes, remoteAttributes));
|
|
35
|
+
const remoteCodec = relation.remoteResource?.codec;
|
|
34
36
|
const meta = {
|
|
35
37
|
fieldName: relationName,
|
|
36
38
|
isUnique,
|
|
37
|
-
type:
|
|
39
|
+
type: remoteCodec?.name || null,
|
|
38
40
|
keys: buildFieldList(relation.localAttributes || [], codec, attributes, context),
|
|
39
|
-
referencedBy: { name:
|
|
41
|
+
referencedBy: { name: remoteCodec?.name || 'unknown' },
|
|
40
42
|
};
|
|
41
43
|
if (isUnique) {
|
|
42
44
|
hasOne.push(meta);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConnectionFilterPreset } from 'graphile-connection-filter';
|
|
2
|
-
import { MinimalPreset, InflektPreset, ConflictDetectorPreset, InflectorLoggerPreset, NoUniqueLookupPreset, EnableAllFilterColumnsPreset, ManyToManyOptInPreset, MetaSchemaPreset, PgTypeMappingsPreset, RequiredInputPreset,
|
|
2
|
+
import { MinimalPreset, InflektPreset, ConflictDetectorPreset, InflectorLoggerPreset, NoUniqueLookupPreset, EnableAllFilterColumnsPreset, ManyToManyOptInPreset, MetaSchemaPreset, PgTypeMappingsPreset, RequiredInputPreset, } from '../plugins';
|
|
3
3
|
import { UnifiedSearchPreset, createMatchesOperatorFactory, createTrgmOperatorFactories } from 'graphile-search';
|
|
4
4
|
import { GraphilePostgisPreset, createPostgisOperatorFactory } from 'graphile-postgis';
|
|
5
5
|
import { UploadPreset } from 'graphile-upload-plugin';
|
|
@@ -77,7 +77,6 @@ export const ConstructivePreset = {
|
|
|
77
77
|
SqlExpressionValidatorPreset(),
|
|
78
78
|
PgTypeMappingsPreset,
|
|
79
79
|
RequiredInputPreset,
|
|
80
|
-
NodeTypeRegistryPreset,
|
|
81
80
|
],
|
|
82
81
|
/**
|
|
83
82
|
* Disable PostGraphile core's condition argument entirely.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-settings",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "graphile settings",
|
|
6
6
|
"main": "index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"graphile-upload-plugin": "^2.4.4",
|
|
54
54
|
"graphile-utils": "5.0.0-rc.8",
|
|
55
55
|
"graphql": "16.13.0",
|
|
56
|
-
"inflekt": "^0.
|
|
56
|
+
"inflekt": "^0.5.0",
|
|
57
57
|
"lru-cache": "^11.2.7",
|
|
58
58
|
"pg": "^8.20.0",
|
|
59
59
|
"pg-query-context": "^2.8.3",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"constructive",
|
|
81
81
|
"graphql"
|
|
82
82
|
],
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "2660dbd64e96cdb785ace8b28fbf9275cb3812aa"
|
|
84
84
|
}
|
|
@@ -17,12 +17,13 @@ function buildBelongsToRelations(codec, attributes, uniques, relations, context)
|
|
|
17
17
|
continue;
|
|
18
18
|
const localAttributes = relation.localAttributes || [];
|
|
19
19
|
const isUnique = uniques.some((unique) => (0, table_resource_utils_1.sameAttributes)(unique.attributes, localAttributes));
|
|
20
|
+
const remoteCodec = relation.remoteResource?.codec;
|
|
20
21
|
belongsTo.push({
|
|
21
22
|
fieldName: relationName,
|
|
22
23
|
isUnique,
|
|
23
|
-
type:
|
|
24
|
+
type: remoteCodec?.name || null,
|
|
24
25
|
keys: (0, table_meta_context_1.buildFieldList)(localAttributes, codec, attributes, context),
|
|
25
|
-
references: { name:
|
|
26
|
+
references: { name: remoteCodec?.name || 'unknown' },
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
return belongsTo;
|
|
@@ -36,12 +37,13 @@ function buildReverseRelations(codec, attributes, relations, context) {
|
|
|
36
37
|
const remoteUniques = (0, table_resource_utils_1.getUniques)(relation.remoteResource || {});
|
|
37
38
|
const remoteAttributes = relation.remoteAttributes || [];
|
|
38
39
|
const isUnique = remoteUniques.some((unique) => (0, table_resource_utils_1.sameAttributes)(unique.attributes, remoteAttributes));
|
|
40
|
+
const remoteCodec = relation.remoteResource?.codec;
|
|
39
41
|
const meta = {
|
|
40
42
|
fieldName: relationName,
|
|
41
43
|
isUnique,
|
|
42
|
-
type:
|
|
44
|
+
type: remoteCodec?.name || null,
|
|
43
45
|
keys: (0, table_meta_context_1.buildFieldList)(relation.localAttributes || [], codec, attributes, context),
|
|
44
|
-
referencedBy: { name:
|
|
46
|
+
referencedBy: { name: remoteCodec?.name || 'unknown' },
|
|
45
47
|
};
|
|
46
48
|
if (isUnique) {
|
|
47
49
|
hasOne.push(meta);
|
|
@@ -80,7 +80,6 @@ exports.ConstructivePreset = {
|
|
|
80
80
|
(0, graphile_sql_expression_validator_1.SqlExpressionValidatorPreset)(),
|
|
81
81
|
plugins_1.PgTypeMappingsPreset,
|
|
82
82
|
plugins_1.RequiredInputPreset,
|
|
83
|
-
plugins_1.NodeTypeRegistryPreset,
|
|
84
83
|
],
|
|
85
84
|
/**
|
|
86
85
|
* Disable PostGraphile core's condition argument entirely.
|