Skip to content

Commit 8cfe3e3

Browse files
saihajtwof
authored andcommitted
match .d.ts definition
1 parent 1482884 commit 8cfe3e3

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/execution/execute.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export type ExecutionContext = {
126126
* - `data` is the result of a successful execution of the query.
127127
* - `extensions` is reserved for adding non-standard properties.
128128
*/
129+
<<<<<<< HEAD
129130
<<<<<<< HEAD:src/execution/execute.ts
130131
export interface ExecutionResult<
131132
TData = ObjMap<unknown>,
@@ -157,16 +158,27 @@ export interface ExecutionArgs {
157158
}
158159
=======
159160
export type ExecutionResult = {
161+
=======
162+
export interface ExecutionResult<
163+
TData = { [key: string]: any },
164+
TExtensions = { [key: string]: any },
165+
> {
166+
>>>>>>> match `.d.ts` definition
160167
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+
}
164172

165-
export type FormattedExecutionResult = {
173+
export interface FormattedExecutionResult<
174+
TData = { [key: string]: any },
175+
TExtensions = { [key: string]: any },
176+
> {
166177
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+
}
170182

171183
export type ExecutionArgs = {
172184
schema: GraphQLSchema;

0 commit comments

Comments
 (0)