Scenarios: lets say we got query like this:
{
users (first: 1000, where: {showInFrontend: true}) { // first : 1000 is an integer value
edges {
node {
databaseId
}
}
}
}
the resulting argument object becomes:
args { first: '1000', where: { showInFrontend: true } } // this is incorrect as its meant to be IntValue
I did a modification to your code locally for now to fix it. The Fix:
In your getArguments and getArgumentObject function you also want to check the kind for IntValue like this eg in your getArguments function :
} else if (arg.value.kind === 'IntValue') { argsObj[arg.name.value] = parseInt(arg.value.value); {
I can do a PR if you want. Also thanks saved me hours of work trying to convert to Json ๐