-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Remote Schema Permissions Default Value Null leads to Validation Error #7772
Copy link
Copy link
Open
Labels
k/bugSomething isn't workingSomething isn't working
Description
Version Information
Server Version: 2.0.10
CLI Version (for CLI related issue): v3
Environment
OSS
What is the expected behaviour?
- I write a new mutation in a remote schema and Hasura recognizes the mutation.
- I activate remote schema permissions.
- The mutation can be executed via Hasura using the admin role.
- I can assign remote schema permissions to a new role that allows it to execute the mutation.
What is the current behaviour?
- I create a new role.
- I try to assign permissions to execute a new mutation.
- I receive the following error:
{
"path": "$.args[1].args",
"error": "validation for the given role-based schema failed because expected default value of input value: \"sale_price\"of input object \"upsert_wma_sale_by_metadata_uuid\" to be null but received ",
"code": "validation-failed"
}
Speculation about the source of the problem
If I change sale_price to a required parameter everything works flawlessly. I.e. the fact that sale_price is optional leads to a problem. I assume that the explicit statement of the default value null in the schema causes the error because parameters are nullable by default. However, this should still work because it is valid GraphQL Syntax and the GraphQL Framework Graphene explicitly states the default value in the schema.
upsert_wma_sale_by_metadata_uuid(is_sold: Boolean!, metadata_uuid: uuid!, sale_price: Float = null): UpsertWmaSaleByMetadataUuid
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
k/bugSomething isn't workingSomething isn't working