We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 604bf1a commit 7d00990Copy full SHA for 7d00990
src/execution/execute.js
@@ -96,12 +96,12 @@ type ExecutionContext = {
96
/**
97
* The result of GraphQL execution.
98
*
99
- * - `data` is the result of a successful execution of the query.
100
* - `errors` is included when any errors occurred as a non-empty array.
+ * - `data` is the result of a successful execution of the query.
101
*/
102
export type ExecutionResult = {
103
- data?: ?{[key: string]: mixed};
104
errors?: Array<GraphQLError>;
+ data?: ?{[key: string]: mixed};
105
};
106
107
@@ -166,7 +166,7 @@ export function execute(
166
if (!context.errors.length) {
167
return { data };
168
}
169
- return { data, errors: context.errors };
+ return { errors: context.errors, data };
170
});
171
172
0 commit comments