Skip to content

Arguments converted to string on additionalResolvers with requiredSelectionSet #4328

Open
@gilgardosh

Description

@gilgardosh

Issue workflow progress

Progress of the issue based on the Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

tried adding an additionalResolvers to my schema in my .meshrc.yaml file which has in the requiredSelectionSet one argument which is an integer, but it gets converted to a string.

To Reproduce
Steps to reproduce the behavior:

something like that, integerId is on the database an integer, but when I execute a query in graphql, I get an error that I supplied a string:

additionalTypeDefs: |
extend type ExtendType {
value: OtherType!
}
additionalResolvers:
- targetTypeName: ExtendType
targetFieldName: value
sourceName: Server1
sourceTypeName: Query
sourceFieldName: getOtherType
requiredSelectionSet: |
{
integerId
}
sourceArgs:
integerId: {root.integerId}

Probably it is due to the string interpolation.

Expected behavior

GraphLQ needs to coerce that value

Environment:

  • OS:
  • @graphql-mesh/...:
  • NodeJS:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions