You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6f100e0
Browse filesBrowse the repository at this point in the historyBrowse files
* config options for internal errors for non-admin role, closehasura#4031
More detailed action debug info is added in response 'internal' field
* add docs
* update CHANGELOG.md
* set admin graphql errors option in ci tests, minor changes to docs
* fix tests
Don't use any auth for sync actions error tests. The request body
changes based on auth type in session_variables (x-hasura-auth-mode)
* Apply suggestions from code review
Co-Authored-By: Marion Schleifer <marion@hasura.io>
* use a new sum type to represent the inclusion of internal errors
As suggested in review by @0x777
-> Move around few modules in to specific API folder
-> Saperate types from Init.hs
* fix tests
Don't use any auth for sync actions error tests. The request body
changes based on auth type in session_variables (x-hasura-auth-mode)
* move 'HttpResponse' to 'Hasura.HTTP' module
* update change log with breaking change warning
* Update CHANGELOG.md
Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+101-1Lines changed: 101 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,106 @@
2
2
3
3
## Next release
4
4
5
+
### server: debugging mode for non-admin roles
6
+
7
+
For any errors the server sends extra information in `extensions` field under `internal` key. Till now this was only
8
+
available for `admin` role requests. To enable this for other roles, start the server with `--dev-mode` flag or set `HASURA_GRAPHQL_DEV_MODE` env variable to `true`:
In case you want to disable `internal` field for `admin` role requests, set `--admin-internal-errors` option to `false` or or set `HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS` env variable to `false`
This feature come in handy during development when you may want to see detailed errors irrespective of roles.
21
+
22
+
**Improved internal errors for Actions**:
23
+
24
+
(This is a **breaking change** with previous 1.2.0-beta releases)
25
+
26
+
The `internal` field for action errors is improved with more debug information. It now includes `request`,
27
+
`response` and `error` fields instead of just `webhook_response` field.
28
+
29
+
Before:
30
+
```json
31
+
{
32
+
"errors": [
33
+
{
34
+
"extensions": {
35
+
"internal": {
36
+
"webhook_response": {
37
+
"age": 25,
38
+
"name": "Alice",
39
+
"id": "some-id"
40
+
}
41
+
},
42
+
"path": "$",
43
+
"code": "unexpected"
44
+
},
45
+
"message": "unexpected fields in webhook response: age"
46
+
}
47
+
]
48
+
}
49
+
```
50
+
After:
51
+
```json
52
+
{
53
+
"errors": [
54
+
{
55
+
"extensions": {
56
+
"internal": {
57
+
"error": "unexpected response",
58
+
"response": {
59
+
"status": 200,
60
+
"body": {
61
+
"age": 25,
62
+
"name": "Alice",
63
+
"id": "some-id"
64
+
},
65
+
"headers": [
66
+
{
67
+
"value": "application/json",
68
+
"name": "Content-Type"
69
+
},
70
+
{
71
+
"value": "abcd",
72
+
"name": "Set-Cookie"
73
+
}
74
+
]
75
+
},
76
+
"request": {
77
+
"body": {
78
+
"session_variables": {
79
+
"x-hasura-role": "admin"
80
+
},
81
+
"input": {
82
+
"arg": {
83
+
"age": 25,
84
+
"name": "Alice",
85
+
"id": "some-id"
86
+
}
87
+
},
88
+
"action": {
89
+
"name": "mirror"
90
+
}
91
+
},
92
+
"url": "http://127.0.0.1:5593/mirror-action",
93
+
"headers": []
94
+
}
95
+
},
96
+
"path": "$",
97
+
"code": "unexpected"
98
+
},
99
+
"message": "unexpected fields in webhook response: age"
100
+
}
101
+
]
102
+
}
103
+
```
104
+
5
105
### cli: add support for .env file
6
106
7
107
ENV vars can now be read from .env file present at the project root directory. A global flag, `--envfile`, is added so you can explicitly provide the .env filename, which defaults to `.env` filename if no flag is provided.
@@ -23,7 +123,7 @@ Along with the check for filtering rows that can be updated, you can now set a p
23
123
24
124
(close #4142) (#4313)
25
125
26
-
### docs: map Postgres operators to corresponding Hasura operators
126
+
### docs: map Postgres operators to corresponding Hasura operators
27
127
28
128
Map Postgres operators to corresponding Hasura operators at various places in docs and link to PG documentation for reference.
29
129
For example, see [here](https://hasura.io/docs/1.0/graphql/manual/api-reference/schema-metadata-api/syntax-defs.html#operator).
0 commit comments