@@ -126,6 +126,7 @@ export type ExecutionContext = {
126
126
* - `data` is the result of a successful execution of the query.
127
127
* - `extensions` is reserved for adding non-standard properties.
128
128
*/
129
+ << < < < << HEAD
129
130
<< < < < << HEAD :src / e x e c u t i o n / execute. ts
130
131
export interface ExecutionResult <
131
132
TData = ObjMap < unknown > ,
@@ -157,16 +158,27 @@ export interface ExecutionArgs {
157
158
}
158
159
= === ===
159
160
export type ExecutionResult = {
161
+ === === =
162
+ export interface ExecutionResult <
163
+ TData = { [ key : string ] : any } ,
164
+ TExtensions = { [ key : string ] : any } ,
165
+ > {
166
+ > >>> >>> match `.d.ts` definition
160
167
errors?: ReadonlyArray < GraphQLError > ;
161
- data ?: ObjMap < unknown > | null ;
162
- extensions ?: ObjMap < unknown > ;
163
- } ;
168
+ // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229
169
+ data?: TData | null ;
170
+ extensions?: TExtensions ;
171
+ }
164
172
165
- export type FormattedExecutionResult = {
173
+ export interface FormattedExecutionResult <
174
+ TData = { [ key : string ] : any } ,
175
+ TExtensions = { [ key : string ] : any } ,
176
+ > {
166
177
errors ?: ReadonlyArray < GraphQLFormattedError > ;
167
- data ?: ObjMap < unknown > | null ;
168
- extensions ?: ObjMap < unknown > ;
169
- } ;
178
+ // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229
179
+ data ?: TData | null ;
180
+ extensions ?: TExtensions ;
181
+ }
170
182
171
183
export type ExecutionArgs = {
172
184
schema : GraphQLSchema ;
0 commit comments