Skip to content

Commit f1f26dc

Browse files
committed
Extract TS specific changes from *.d.ts files
1 parent 2917840 commit f1f26dc

File tree

128 files changed

+255
-5681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+255
-5681
lines changed

src/error/GraphQLError.d.ts

-86
This file was deleted.

src/error/formatError.d.ts

-37
This file was deleted.

src/error/index.d.ts

-5
This file was deleted.

src/error/locatedError.d.ts

-13
This file was deleted.

src/error/syntaxError.d.ts

-11
This file was deleted.

src/execution/execute.d.ts

-205
This file was deleted.

src/execution/execute.ts

+12-6
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)