Commit c24df9e
committed
Ensure
According to the spec, the `data` entry should always exist once
execution starts. Only if an error is raised _before_ execution starts
should the `data` key be omitted.
The only test that needed updating was when an `ExecutionError` was
raised during the `execute_query` trace hook. Despite this running
before `super`, this still happens "during execution" and should have
the `data` key present.
Ref: https://spec.graphql.org/draft/#sec-Datadata entry exists for execution errors1 parent db11d0c commit c24df9e
File tree
2 files changed
+7
-3
lines changed- lib/graphql/execution
- spec/graphql/execution
2 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
0 commit comments