i am using node-red-contrib-graphql to send queries to a graphql server. It works with the value directly write into the query, but i actually want to give values to the graphql node and use msg.payload to build the query.
I tried many solution but nothing works. So is it possible ?
According to the documentation (see the node's flows library page: https://flows.nodered.org/node/node-red-contrib-graphql), it allows the incoming msg.payload to be an object with properties that can be referenced in Mustache syntax, when you use the query field in the node as a template.
I hope that helps. Beyond that, this node does not appear to offer that functionality.
The difference between double brackets and triple brackets is that double brackets just places the value in the template, while the triple brackets add in the raw value, including quotes on both sides of a string.
i actually succed by adding en empty query in the graphql node with { } and directly filling the msg.template with the query in previous function node. it works fine. But weird that i cannot simply pass payload.