introspectron 5.10.7 → 5.10.9
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/gql.js +5 -5
- package/gql.js +5 -5
- package/package.json +4 -4
package/esm/gql.js
CHANGED
|
@@ -62,14 +62,14 @@ export const parseGraphQuery = (introQuery) => {
|
|
|
62
62
|
}
|
|
63
63
|
return getInputForQueries(input.ofType, context);
|
|
64
64
|
}
|
|
65
|
-
if (input.kind === 'INPUT_OBJECT' && input.name &&
|
|
65
|
+
if (input.kind === 'INPUT_OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
66
66
|
const schema = HASH[input.name];
|
|
67
67
|
context.properties = schema.inputFields.map((field) => ({ name: field.name, type: field.type })).reduce((m3, v) => {
|
|
68
68
|
m3[v.name] = v;
|
|
69
69
|
return m3;
|
|
70
70
|
}, {});
|
|
71
71
|
}
|
|
72
|
-
else if (input.kind === 'OBJECT' && input.name &&
|
|
72
|
+
else if (input.kind === 'OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
73
73
|
const schema = HASH[input.name];
|
|
74
74
|
context.properties = schema.fields.map((field) => ({ name: field.name, type: field.type })).reduce((m3, v) => {
|
|
75
75
|
m3[v.name] = v;
|
|
@@ -98,14 +98,14 @@ export const parseGraphQuery = (introQuery) => {
|
|
|
98
98
|
}
|
|
99
99
|
return getInputForMutations(input.ofType, context);
|
|
100
100
|
}
|
|
101
|
-
if (input.kind === 'INPUT_OBJECT' && input.name &&
|
|
101
|
+
if (input.kind === 'INPUT_OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
102
102
|
const schema = HASH[input.name];
|
|
103
103
|
context.properties = schema.inputFields.map((field) => getInputForMutations(field.type, { name: field.name })).reduce((m3, v) => {
|
|
104
104
|
m3[v.name] = v;
|
|
105
105
|
return m3;
|
|
106
106
|
}, {});
|
|
107
107
|
}
|
|
108
|
-
else if (input.kind === 'OBJECT' && input.name &&
|
|
108
|
+
else if (input.kind === 'OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
109
109
|
const schema = HASH[input.name];
|
|
110
110
|
context.properties = schema.fields.map((field) => ({ name: field.name, type: field.type })).reduce((m3, v) => {
|
|
111
111
|
m3[v.name] = v;
|
|
@@ -128,7 +128,7 @@ export const parseGraphQuery = (introQuery) => {
|
|
|
128
128
|
const props = mutation.args.reduce((m2, arg) => {
|
|
129
129
|
const type = arg.type?.ofType?.name;
|
|
130
130
|
const isNotNull = arg.type?.kind === 'NON_NULL';
|
|
131
|
-
if (type &&
|
|
131
|
+
if (type && Object.prototype.hasOwnProperty.call(HASH, type)) {
|
|
132
132
|
const schema = HASH[type];
|
|
133
133
|
const fields = schema.inputFields.filter((a) => a.name !== 'clientMutationId');
|
|
134
134
|
const properties = fields.map((a) => getInputForMutations(a.type, { name: a.name })).reduce((m3, v) => {
|
package/gql.js
CHANGED
|
@@ -67,14 +67,14 @@ const parseGraphQuery = (introQuery) => {
|
|
|
67
67
|
}
|
|
68
68
|
return getInputForQueries(input.ofType, context);
|
|
69
69
|
}
|
|
70
|
-
if (input.kind === 'INPUT_OBJECT' && input.name &&
|
|
70
|
+
if (input.kind === 'INPUT_OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
71
71
|
const schema = HASH[input.name];
|
|
72
72
|
context.properties = schema.inputFields.map((field) => ({ name: field.name, type: field.type })).reduce((m3, v) => {
|
|
73
73
|
m3[v.name] = v;
|
|
74
74
|
return m3;
|
|
75
75
|
}, {});
|
|
76
76
|
}
|
|
77
|
-
else if (input.kind === 'OBJECT' && input.name &&
|
|
77
|
+
else if (input.kind === 'OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
78
78
|
const schema = HASH[input.name];
|
|
79
79
|
context.properties = schema.fields.map((field) => ({ name: field.name, type: field.type })).reduce((m3, v) => {
|
|
80
80
|
m3[v.name] = v;
|
|
@@ -103,14 +103,14 @@ const parseGraphQuery = (introQuery) => {
|
|
|
103
103
|
}
|
|
104
104
|
return getInputForMutations(input.ofType, context);
|
|
105
105
|
}
|
|
106
|
-
if (input.kind === 'INPUT_OBJECT' && input.name &&
|
|
106
|
+
if (input.kind === 'INPUT_OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
107
107
|
const schema = HASH[input.name];
|
|
108
108
|
context.properties = schema.inputFields.map((field) => getInputForMutations(field.type, { name: field.name })).reduce((m3, v) => {
|
|
109
109
|
m3[v.name] = v;
|
|
110
110
|
return m3;
|
|
111
111
|
}, {});
|
|
112
112
|
}
|
|
113
|
-
else if (input.kind === 'OBJECT' && input.name &&
|
|
113
|
+
else if (input.kind === 'OBJECT' && input.name && Object.prototype.hasOwnProperty.call(HASH, input.name)) {
|
|
114
114
|
const schema = HASH[input.name];
|
|
115
115
|
context.properties = schema.fields.map((field) => ({ name: field.name, type: field.type })).reduce((m3, v) => {
|
|
116
116
|
m3[v.name] = v;
|
|
@@ -133,7 +133,7 @@ const parseGraphQuery = (introQuery) => {
|
|
|
133
133
|
const props = mutation.args.reduce((m2, arg) => {
|
|
134
134
|
const type = arg.type?.ofType?.name;
|
|
135
135
|
const isNotNull = arg.type?.kind === 'NON_NULL';
|
|
136
|
-
if (type &&
|
|
136
|
+
if (type && Object.prototype.hasOwnProperty.call(HASH, type)) {
|
|
137
137
|
const schema = HASH[type];
|
|
138
138
|
const fields = schema.inputFields.filter((a) => a.name !== 'clientMutationId');
|
|
139
139
|
const properties = fields.map((a) => getInputForMutations(a.type, { name: a.name })).reduce((m3, v) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "introspectron",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.9",
|
|
4
4
|
"description": "introspect your Postgres database and generate an SDK",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"main": "index.js",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"test:watch": "jest --watch"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@constructive-io/graphql-test": "^5.10.
|
|
32
|
+
"@constructive-io/graphql-test": "^5.10.9",
|
|
33
33
|
"@jest/test-sequencer": "^30.4.1",
|
|
34
34
|
"@types/pg": "^8.20.0",
|
|
35
35
|
"makage": "^0.3.0",
|
|
36
|
-
"pgsql-test": "^5.9.
|
|
36
|
+
"pgsql-test": "^5.9.9"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"graphql": "16.13.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"graphile",
|
|
49
49
|
"constructive"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "e6a7a57f88c9deb2a4acecaba2451320d1be8203"
|
|
52
52
|
}
|