hasura / hasura/graphql-engine
Unable to set null column preset value via console
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.2.0
### Environment
OSS
### What is the expected behaviour?
Users interacting with the console should be able to set `null` static column preset values
### Keywords
column preset, null, static, console, string
### What is the current behaviour?
* All column preset values input via the console seem to be interpreted as a _string_
* Unsure if this should affect other data types (i.e. booleans)
* Unsure if this should affect _session variable_ preset types (i.e. relates to https://github.com/hasura/graphql-engine/issues/8173)
### How to reproduce the issue?
1. Set a static column preset of `null` in the console, i.e.

2. See that it's persisted as the string `"null"`
3. Manually update YAML value to `null`
4. Restart Hasura
5. See that the `null` column preset value behaves as expected but is misrepresented as empty in the console UI, i.e.

### Any possible solutions?
I imagine the console should specially handle a small set of user input (i.e. `null`, `false`, `true`, etc)
Contributor guide
Research direction
Start by locating the console code that serializes and displays static column preset values, then reproduce the issue with a null preset using the steps in the report. Done means the console persists null as a null value rather than the string "null" and represents an existing null preset correctly; clarify whether booleans and session-variable presets are in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100