Skip to content

Commit

Permalink
match .d.ts definition
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj authored and twof committed May 28, 2021
1 parent 1482884 commit 8cfe3e3
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/execution/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export type ExecutionContext = {
* - `data` is the result of a successful execution of the query.
* - `extensions` is reserved for adding non-standard properties.
*/
<<<<<<< HEAD
<<<<<<< HEAD:src/execution/execute.ts
export interface ExecutionResult<
TData = ObjMap<unknown>,
Expand Down Expand Up @@ -157,16 +158,27 @@ export interface ExecutionArgs {
}
=======
export type ExecutionResult = {
=======
export interface ExecutionResult<
TData = { [key: string]: any },
TExtensions = { [key: string]: any },
> {
>>>>>>> match `.d.ts` definition
errors?: ReadonlyArray<GraphQLError>;
data?: ObjMap<unknown> | null;
extensions?: ObjMap<unknown>;
};
// TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229
data?: TData | null;
extensions?: TExtensions;
}

export type FormattedExecutionResult = {
export interface FormattedExecutionResult<
TData = { [key: string]: any },
TExtensions = { [key: string]: any },
> {
errors?: ReadonlyArray<GraphQLFormattedError>;
data?: ObjMap<unknown> | null;
extensions?: ObjMap<unknown>;
};
// TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229
data?: TData | null;
extensions?: TExtensions;
}

export type ExecutionArgs = {
schema: GraphQLSchema;
Expand Down

0 comments on commit 8cfe3e3

Please sign in to comment.