graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

[Console UI] Remote Schemas do not load default values for input type's field

Open Phu96 opened this issue 3 years ago • 4 comments

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
}
  1. Reload the remote schema from console UI.

  2. Open remote schema's permissions and add an arbitrary role like ROLE_TEST for example.

  3. Click edit permission for that role.

  4. The UI display the following input type, which doesn't have default values for its field

    Screen Shot 2021-08-26 at 17 42 20
  5. Select the previously created mutation then click "Save Permision"

  6. The following error occurred.

    Screen Shot 2021-08-26 at 17 57 56

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.

Phu96 avatar Aug 26 '21 11:08 Phu96

I am also experiencing this issue on 2.0.9 I was able to edit the remote_schemas.yaml file to make my type Query operations work, however I cannot get my type Mutation to take effect that I added manually.

Destreyf avatar Sep 13 '21 17:09 Destreyf

I am also experiencing this issue on 2.0.9 I was able to edit the remote_schemas.yaml file to make my type Query operations work, however I cannot get my type Mutation to take effect that I added manually.

i'm tired of manually editing the remote_schemas.yaml to makes it work :(. Hope they will fix soon.

Phu96 avatar Sep 14 '21 11:09 Phu96

Also experiencing this issue, we have hundreds of queries and mutations and setting default values for them would take days. By disabling remote schema permissions, everything works.

L-U-C-K-Y avatar May 21 '22 14:05 L-U-C-K-Y

This still occurs a year later. It makes the Console UI essentially useless for editing the remote schema permissions, everything has to be done manually. The worst thing is that you only find out after spending time on painstakingly checking the right fields, only to not be able to save them and having to do the same thing manually in the YAML file. It's a massive waste of time.

Lippur avatar Aug 05 '22 14:08 Lippur