Closed guivazcabral closed 1 year ago
Hmm, I am not familiar with graphql, so I cannot really assess this.
I can see quite a bit of false positives for parent:type() == "call_expression"
. Have you checked various test cases like string arguments in a function call? I could imagine that some variation of this could also match that condition?
a.replace(`foobar${baz}`)
It's not really related to graphql, it's related to tagged templates
I did test that, and in that particular case for example, the parent node of the template string is of type arguments
so the plugin functions as expected
Okay then, we'll give it a go then.
let me know if something goes wrong and I can try to make it better :)
Checks if parent of template string is a function call. This allows avoiding unwanted behavior when editing a graphql query using graphql-tag, for example:
This applies to any tagged template literal.
Might need some testing :)