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