@@ -43,7 +43,9 @@ function parceFind(_levelA) {
43
43
//=====================================================
44
44
45
45
function getGraphQLValue(value) {
46
- if ("string" === typeof value) {
46
+ if (value === null) {
47
+ return value;
48
+ } else if ("string" === typeof value) {
47
49
value = JSON.stringify(value);
48
50
} else if (Array.isArray(value)) {
49
51
value = value
@@ -57,6 +59,7 @@ function getGraphQLValue(value) {
57
59
value = value.toSource().slice(2,-2);
58
60
else*/
59
61
value = objectToString(value);
62
+ if (value === "{}") return undefined;
60
63
//console.error("No toSource!!",value);
61
64
}
62
65
return value;
@@ -70,7 +73,10 @@ function objectToString(obj) {
70
73
continue;
71
74
}
72
75
// if ("object" === typeof obj[prop]) {
73
- sourceA.push(`${prop}:${getGraphQLValue(obj[prop])}`);
76
+ let value = getGraphQLValue(obj[prop]);
77
+ if (typeof value !== "undefined") {
78
+ sourceA.push(`${prop}:${value}`);
79
+ }
74
80
// } else {
75
81
// sourceA.push(`${prop}:${obj[prop]}`);
76
82
// }
@@ -95,7 +101,9 @@ function Query(_fnNameS, _aliasS_OR_Filter) {
95
101
if ("{}" === val) {
96
102
continue;
97
103
}
98
- this.headA.push(`${propS}:${val}`);
104
+ if (typeof val !== "undefined") {
105
+ this.headA.push(`${propS}:${val}`);
106
+ }
99
107
}
100
108
return this;
101
109
};
0 commit comments