Commit 3f49961
authored
fix: properly type
Following typescript documentation, it's not possible override interface
property, we can only add new props.
Since it's declared as unknown dict, even if we merge
`GraphQLErrorExtensions`, we can't access to our extensions without
workaround and verbose typescript in source-code.
It's annoying since apollo expose `GraphQLFormattedError` instead
`GraphQLError`
Refs:
https://www.typescriptlang.org/docs/handbook/declaration-merging.html
Refs: apollographql/apollo-client#11789extensions in GraphQLFormattedError (#4286)1 parent 423e72d commit 3f49961
3 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
278 | | - | |
| 291 | + | |
279 | 292 | | |
280 | 293 | | |
281 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
0 commit comments