File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ export abstract class GraphtonBaseQuery<QueryResponse> {
27
27
public abstract readonly queryName : string ;
28
28
public abstract readonly rootType : RootType ;
29
29
30
+ constructor ( ) {
31
+ this . initGraphtonQueryReturnsObject ( ) ;
32
+ }
33
+
34
+ protected initGraphtonQueryReturnsObject ( ) : void { }
35
+
30
36
/**
31
37
* Get the return object format
32
38
*/
@@ -82,8 +88,12 @@ export abstract class GraphtonBaseQuery<QueryResponse> {
82
88
83
89
type FieldSelectorTypeFormat = { [ key : string ] : ( { } | FieldSelectorTypeFormat ) ; } ;
84
90
export abstract class GraphtonQueryReturnsObject < FieldSelectorType extends FieldSelectorTypeFormat , ReturnType extends { [ p : string ] : unknown } > {
85
- protected selectedFields : { root : Partial < FieldSelectorType > } = { root : { } } ;
86
- protected abstract readonly returnType : keyof typeof fieldObjectMap ;
91
+ protected selectedFields ! : { root : Partial < FieldSelectorType > } ;
92
+ protected readonly returnType ! : keyof typeof fieldObjectMap ;
93
+
94
+ protected initGraphtonQueryReturnsObject ( ) : void {
95
+ this . selectedFields = { root : { } } ;
96
+ }
87
97
88
98
/**
89
99
* Select fields that should be returned
You can’t perform that action at this time.
0 commit comments