这是indexloc提供的服务,不要输入任何密码
Skip to content

Remote Schema Permission: #10759

@jared-fraser

Description

@jared-fraser

Version Information

Server Version: v2.48.1-cloud.1
CLI Version (for CLI related issue):

Environment

Cloud

What is the current behaviour?

When trying to give provide role based access to a remote schema.

validation for the given role-based schema failed because expected default value of input value: "isActive" of input object "CreateCategoryInput" to be true but received "true"

Looking at the graphql schema, the Boolean is typed correctly.

input CreateCategoryInput {
  isActive: Boolean = true
}

Introspecting the schema, shows that the type is Boolean, but it's possible that Hasura is being tripped up by the defaultValue is encoded as "true"

{
  "data": {
    "__type": {
      "name": "CreateCategoryInput",
      "kind": "INPUT_OBJECT",
      "inputFields": [
        {
          "name": "isActive",
          "defaultValue": "true",
          "type": {
            "kind": "SCALAR",
            "name": "Boolean",
            "ofType": null
          }
        }
      ]
    }
  }
}

What is the expected behaviour?

I should be able to set role permission on a remote schema with a default Boolean value

How to reproduce the issue?

  1. Create a schema with a default Boolean input.

Screenshots or Screencast

Please provide any traces or logs that could help here.

Any possible solutions/workarounds you're aware of?

Do not set a default value in GraphQL

Keywords

remote-schema, role-based, default-value

Metadata

Metadata

Assignees

No one assigned

    Labels

    k/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions