[BUG] Issue with args containing $ sign
patrykwegrzyn opened this issue · comments
Describe the bug
Parser fails when args
value contains $
sign
To Reproduce
const query = {
operation: {
name: 'user',
args: {
name: '$Joe'
},
fields: ['name', 'age']
}
}
gotQL.parser(query, "query")
Resulting in
Error: Parse error: Failed to parse operation "user" => Variable "Joe" is defined on operation but it has neither a type or a value
I see, I'll change it because the expected behavior is going way over where it should be. This behavior should only be present in arg values, not names.
Thanks!
Hi @khaosdoctor thanks for quick response on this one.
I would like to add that i come across with this issue when i was trying to use bcrypt hash
as a arg value.
Example -> $2a$10$bcm1i7K/wFwbPxVRqeM5MeS2zs4sVRysPYgnkuw.eGiwXTtpmNlt
these hashes are prefixed with $2
Can you recommend any solution for this ?
@patrykwegrzyn Oh so these are arg values? Well, in this case I suggest you to use the escape key to escape all values as strings, it should not occur after that
Hi @khaosdoctor i ended using something else , thanks for the heads up