graphql-mesh
graphql-mesh copied to clipboard
Arguments converted to string on additionalResolvers with requiredSelectionSet
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- [ ] 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
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