graphile-settings 4.18.8 → 4.18.10
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/meta-schema/constraint-meta-builders.js +1 -1
- package/esm/plugins/meta-schema/relation-meta-builders.js +3 -1
- package/esm/plugins/meta-schema/table-meta-builder.js +1 -1
- package/package.json +3 -3
- package/plugins/meta-schema/constraint-meta-builders.js +1 -1
- package/plugins/meta-schema/relation-meta-builders.js +3 -1
- package/plugins/meta-schema/table-meta-builder.js +1 -1
|
@@ -41,7 +41,7 @@ export function buildUniqueConstraints(codec, attributes, uniques, context) {
|
|
|
41
41
|
export function buildForeignKeyConstraints(codec, attributes, relations, context) {
|
|
42
42
|
const constraints = [];
|
|
43
43
|
for (const [relationName, relation] of Object.entries(relations)) {
|
|
44
|
-
if (relation.isReferencee
|
|
44
|
+
if (relation.isReferencee)
|
|
45
45
|
continue;
|
|
46
46
|
const remoteCodec = relation.remoteResource?.codec;
|
|
47
47
|
const remoteAttributes = remoteCodec?.attributes || {};
|
|
@@ -8,7 +8,9 @@ function isRecord(value) {
|
|
|
8
8
|
export function buildBelongsToRelations(codec, attributes, uniques, relations, context) {
|
|
9
9
|
const belongsTo = [];
|
|
10
10
|
for (const [relationName, relation] of Object.entries(relations)) {
|
|
11
|
-
|
|
11
|
+
// PostGraphile only sets isReferencee when true (reverse FK);
|
|
12
|
+
// forward relations have isReferencee undefined, not false.
|
|
13
|
+
if (relation.isReferencee)
|
|
12
14
|
continue;
|
|
13
15
|
const localAttributes = relation.localAttributes || [];
|
|
14
16
|
const isUnique = uniques.some((unique) => sameAttributes(unique.attributes, localAttributes));
|
|
@@ -19,7 +19,7 @@ function buildTableMeta(resource, schemaName, context) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
for (const relation of Object.values(relations)) {
|
|
22
|
-
if (relation.isReferencee
|
|
22
|
+
if (relation.isReferencee)
|
|
23
23
|
continue;
|
|
24
24
|
for (const attrName of relation.localAttributes || [])
|
|
25
25
|
fkAttrNames.add(attrName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-settings",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.10",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "graphile settings",
|
|
6
6
|
"main": "index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"graphile-config": "1.0.0",
|
|
49
49
|
"graphile-connection-filter": "^1.3.7",
|
|
50
50
|
"graphile-postgis": "^2.9.9",
|
|
51
|
-
"graphile-search": "^1.5.
|
|
51
|
+
"graphile-search": "^1.5.9",
|
|
52
52
|
"graphile-sql-expression-validator": "^2.6.2",
|
|
53
53
|
"graphile-upload-plugin": "^2.5.2",
|
|
54
54
|
"graphile-utils": "5.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"constructive",
|
|
81
81
|
"graphql"
|
|
82
82
|
],
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "9356877ea3ea61013b28b1496f015776e82ccb85"
|
|
84
84
|
}
|
|
@@ -48,7 +48,7 @@ function buildUniqueConstraints(codec, attributes, uniques, context) {
|
|
|
48
48
|
function buildForeignKeyConstraints(codec, attributes, relations, context) {
|
|
49
49
|
const constraints = [];
|
|
50
50
|
for (const [relationName, relation] of Object.entries(relations)) {
|
|
51
|
-
if (relation.isReferencee
|
|
51
|
+
if (relation.isReferencee)
|
|
52
52
|
continue;
|
|
53
53
|
const remoteCodec = relation.remoteResource?.codec;
|
|
54
54
|
const remoteAttributes = remoteCodec?.attributes || {};
|
|
@@ -13,7 +13,9 @@ function isRecord(value) {
|
|
|
13
13
|
function buildBelongsToRelations(codec, attributes, uniques, relations, context) {
|
|
14
14
|
const belongsTo = [];
|
|
15
15
|
for (const [relationName, relation] of Object.entries(relations)) {
|
|
16
|
-
|
|
16
|
+
// PostGraphile only sets isReferencee when true (reverse FK);
|
|
17
|
+
// forward relations have isReferencee undefined, not false.
|
|
18
|
+
if (relation.isReferencee)
|
|
17
19
|
continue;
|
|
18
20
|
const localAttributes = relation.localAttributes || [];
|
|
19
21
|
const isUnique = uniques.some((unique) => (0, table_resource_utils_1.sameAttributes)(unique.attributes, localAttributes));
|
|
@@ -22,7 +22,7 @@ function buildTableMeta(resource, schemaName, context) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
for (const relation of Object.values(relations)) {
|
|
25
|
-
if (relation.isReferencee
|
|
25
|
+
if (relation.isReferencee)
|
|
26
26
|
continue;
|
|
27
27
|
for (const attrName of relation.localAttributes || [])
|
|
28
28
|
fkAttrNames.add(attrName);
|