Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable Use Examples #47

Open
pinghe opened this issue Feb 28, 2023 · 3 comments
Open

Variable Use Examples #47

pinghe opened this issue Feb 28, 2023 · 3 comments

Comments

@pinghe
Copy link

pinghe commented Feb 28, 2023

Where is variable use example

@tonybroadbent
Copy link

Have you read the 'README' all the way to the bottom? It describes how to handle variables, admittedly there isn't an example flow. Perhaps you could make one?

@g8rs-hub
Copy link

g8rs-hub commented Sep 7, 2024

Hi I've recently been trying to get variables to work and keep getting issues with passing them into my GraphQL query node. My query is very simple, and when I hardcode the input argument it does work:

{
    GetInfo(Info: { ID: "Apple" }) {
        Description 
    } 
}

I want to pass in a string variable to replace Apple and am having difficulty. I have tried getting the variable and passing it via a function node with msg.variables = {id: msg.payload }; and updated query to look like:

{
    GetInfo(Info: { ID: $id }) {
        Description 
    } 
}

I feel like I am missing something simple, any help would be greatly appreciated.

@EvanGrote
Copy link

I'm in the same situation as @g8rs-hub -- my request works when I hardcode the inputs but not when I try to use variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants