hasura / hasura/graphql-engine
[Console UI] Remote Schemas do not load default values for input type's field
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Version:
hasura/graphql-engine:v2.0.7
Steps to produce
1. Add a new mutation to remote schema(created with Symfony framework using GraphQLite) with the following input as an argument
```
input TestInput {
client_note: String = null
client_email: String = null
}
```
2. Reload the remote schema from console UI.
3. Open remote schema's permissions and add an arbitrary role like ROLE_TEST for example.
4. Click edit permission for that role.
5. The UI display the following input type, which doesn't have default values for its field
6. Select the previously created mutation then click "Save Permision"
7. The following error occurred.

When I inspect the request payload which contains the definition of the remote schema, I realized that it also didn't have default values for TestInput's field, which are null in this case.
Contributor guide
Research direction
Reproduce the issue in the Console UI using a remote schema with a TestInput field whose default is null, then inspect the remote schema definition in the request payload. Trace how remote schema permissions load and render input fields, and verify that saving a permission preserves the field default values without producing the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100