console: fix checkbox for forwarding client headers in actions (close #4595) (#4669)

This commit is contained in:
Jigyasu Arya 2020-05-12 15:22:23 +05:30 committed by GitHub
parent c843f787fe
commit f993a6c907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 11 deletions

View File

@ -16,6 +16,7 @@ RETURNS boolean AS $$
); );
$$ LANGUAGE sql STABLE; $$ LANGUAGE sql STABLE;
``` ```
and make a query like: and make a query like:
``` ```
@ -25,7 +26,7 @@ query {
content content
likedByMe likedByMe
} }
} }
``` ```
Support for this is now added through the `add_computed_field` API. Support for this is now added through the `add_computed_field` API.
@ -39,6 +40,7 @@ Read more about the session argument for computed fields in the [docs](https://h
- console: avoid count queries for large tables (#4692) - console: avoid count queries for large tables (#4692)
- console: add read replica support section to pro popup (#4118) - console: add read replica support section to pro popup (#4118)
- console: allow modifying default value for PK (fix #4075) (#4679) - console: allow modifying default value for PK (fix #4075) (#4679)
- console: fix checkbox for forwarding client headers in actions (#4595)
- cli: list all avialable commands in root command help (fix #4623) - cli: list all avialable commands in root command help (fix #4623)
- docs: add section on actions vs. remote schemas to actions documentation (#4284) - docs: add section on actions vs. remote schemas to actions documentation (#4284)
- docs: fix wrong info about excluding scheme in CORS config - docs: fix wrong info about excluding scheme in CORS config
@ -107,6 +109,7 @@ The `internal` field for action errors is improved with more debug information.
`response` and `error` fields instead of just `webhook_response` field. `response` and `error` fields instead of just `webhook_response` field.
Before: Before:
```json ```json
{ {
"errors": [ "errors": [
@ -127,7 +130,9 @@ Before:
] ]
} }
``` ```
After: After:
```json ```json
{ {
"errors": [ "errors": [
@ -191,6 +196,7 @@ ENV vars can now be read from .env file present at the project root directory. A
``` ```
hasura console --envfile production.env hasura console --envfile production.env
``` ```
The above command will read ENV vars from `production.env` file present at the project root directory. The above command will read ENV vars from `production.env` file present at the project root directory.
(close #4129) (#4454) (close #4129) (#4454)

View File

@ -63,8 +63,7 @@ const AddAction = ({
dispatch(dispatchNewHeaders(hs)); dispatch(dispatchNewHeaders(hs));
}; };
const toggleForwardClientHeaders = e => { const toggleForwardClientHeaders = () => {
e.preventDefault();
dispatch(toggleFCH()); dispatch(toggleFCH());
}; };

View File

@ -32,15 +32,12 @@ const HandlerEditor = ({
/> />
</h2> </h2>
<div className={`${styles.add_mar_bottom_mid}`}> <div className={`${styles.add_mar_bottom_mid}`}>
<label <label className={`${styles.add_mar_right} ${styles.cursorPointer}`}>
className={`${styles.add_mar_right} ${styles.cursorPointer}`}
onClick={toggleForwardClientHeaders}
>
<input <input
type="checkbox" type="checkbox"
checked={forwardClientHeaders} checked={forwardClientHeaders}
readOnly onChange={toggleForwardClientHeaders}
className={`${styles.add_mar_right_small}`} className={`${styles.add_mar_right_small} ${styles.cursorPointer}`}
/> />
Forward client headers to webhook Forward client headers to webhook
</label> </label>

View File

@ -74,8 +74,7 @@ const ActionEditor = ({
dispatch(dispatchNewHeaders(hs)); dispatch(dispatchNewHeaders(hs));
}; };
const toggleForwardClientHeaders = e => { const toggleForwardClientHeaders = () => {
e.preventDefault();
dispatch(toggleFCH()); dispatch(toggleFCH());
}; };