@snowtop/ent 0.1.0-alpha58 → 0.1.0-alpha59
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/package.json +1 -1
- package/parse_schema/parse.js +13 -0
- package/schema/schema.d.ts +4 -1
package/package.json
CHANGED
package/parse_schema/parse.js
CHANGED
|
@@ -36,6 +36,19 @@ function processFields(src, patternName) {
|
|
|
36
36
|
else {
|
|
37
37
|
delete f.polymorphic;
|
|
38
38
|
}
|
|
39
|
+
if (field.private) {
|
|
40
|
+
// convert boolean into object
|
|
41
|
+
// we keep boolean as an option to keep API simple
|
|
42
|
+
if (typeof field.private === "boolean") {
|
|
43
|
+
f.private = {};
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
f.private = field.private;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
delete f.private;
|
|
51
|
+
}
|
|
39
52
|
// convert string to object to make API consumed by go simple
|
|
40
53
|
if (f.fieldEdge && f.fieldEdge.inverseEdge) {
|
|
41
54
|
if (typeof f.fieldEdge.inverseEdge === "string") {
|
package/schema/schema.d.ts
CHANGED
|
@@ -173,13 +173,16 @@ export interface FieldEdge {
|
|
|
173
173
|
getLoaderInfoFromSchema?: getLoaderInfoFn;
|
|
174
174
|
disableBuilderType?: boolean;
|
|
175
175
|
}
|
|
176
|
+
interface PrivateOptions {
|
|
177
|
+
exposeToActions?: boolean;
|
|
178
|
+
}
|
|
176
179
|
export interface FieldOptions {
|
|
177
180
|
nullable?: boolean;
|
|
178
181
|
storageKey?: string;
|
|
179
182
|
serverDefault?: any;
|
|
180
183
|
unique?: boolean;
|
|
181
184
|
hideFromGraphQL?: boolean;
|
|
182
|
-
private?: boolean;
|
|
185
|
+
private?: boolean | PrivateOptions;
|
|
183
186
|
sensitive?: boolean;
|
|
184
187
|
graphqlName?: string;
|
|
185
188
|
index?: boolean;
|