Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Fix RequestInfo typings #646

Merged
merged 1 commit into from
Jun 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,17 @@ export interface RequestInfo {
/**
* The variable values used at runtime.
*/
variables: { readonly [name: string]: unknown };
variables: { readonly [name: string]: unknown } | null;

/**
* The (optional) operation name requested.
*/
operationName: string;
operationName: string | null;

/**
* The result of executing the operation.
*/
result: unknown;
result: ExecutionResult;

/**
* A value to pass as the context to the graphql() function.
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export type RequestInfo = {|
/**
* The result of executing the operation.
*/
result: ExecutionResult | null,
result: ExecutionResult,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the null here because result could never be null (see here)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for comment 馃憤
It's very helpful.


/**
* A value to pass as the context to the graphql() function.
Expand Down