Skip to content

Commit 83745dd

Browse files
saihajIvanGoncharov
authored andcommitted
match .d.ts definition
1 parent 38fb408 commit 83745dd

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/execution/execute.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,22 @@ export interface ExecutionContext {
112112
* - `data` is the result of a successful execution of the query.
113113
* - `extensions` is reserved for adding non-standard properties.
114114
*/
115-
export interface ExecutionResult {
115+
export interface ExecutionResult<
116+
TData = ObjMap<unknown>,
117+
TExtensions = ObjMap<unknown>,
118+
> {
116119
errors?: ReadonlyArray<GraphQLError>;
117-
data?: ObjMap<unknown> | null;
118-
extensions?: ObjMap<unknown>;
120+
data?: TData | null;
121+
extensions?: TExtensions;
119122
}
120123

121-
export interface FormattedExecutionResult {
124+
export interface FormattedExecutionResult<
125+
TData = ObjMap<unknown>,
126+
TExtensions = ObjMap<unknown>,
127+
> {
122128
errors?: ReadonlyArray<GraphQLFormattedError>;
123-
data?: ObjMap<unknown> | null;
124-
extensions?: ObjMap<unknown>;
129+
data?: TData | null;
130+
extensions?: TExtensions;
125131
}
126132

127133
export interface ExecutionArgs {

0 commit comments

Comments
 (0)