PricingBlog

Graph QL Variable Error

  • the__starlord-1506326769425453098

    The_StarLord

    12 hours ago

    I am working on integrating a GraphQL query to do a mutation update through a variable. (img 1)

    I have the mutation working when I hard-code the data into the API call (img 2)

    I have gone through most of the tutorial videos, but I can't recall anything discussing this. The error reads : "variable '_userId' is declared as 'uuid', but used where 'uuid!' is expected".

    The second half of that error message makes me think it might be out of my control and on the backend somewhere, but it is hard to tell.

    Is there a resrouce for Variables in GraphQL I can review in the documentation or a video? Happy to be told I missed something and to study up.
    1506326769777643520-image.png
    1506326772994801786-image.png
  • the__starlord-1506328048809545758

    The_StarLord

    12 hours ago

    Also, more than happy just to hop on a call with someone from the NordCraft team to go over it and answer any customer questions that can help product development. 🫡
  • the__starlord-1506332044437754007

    The_StarLord

    12 hours ago

    Another deeper dive. Looking at the quest payload, when hardcoded obviously the ID is correct, however when using a variable the data is not getting substituted and instead the variable name is send in the request.

    Really not sure if I am just setting this up wrong, or it's a bug 🤷🏻‍♂️ 🪲
    1506332044777750669-variable-request.png
    1506332045230739476-hardcoded-request.png
  • Tod-1506332047696855170

    Tod

    12 hours ago

    Great job @The_StarLord! Your contribution to the Nordcraft Community just made you advance to Community Level 1! 🌲
  • max.kayr-1506354067272892506

    Max

    10 hours ago

    Hey! In this call, did you actually bind the variable? It looks like it is not used. Or did you bind a different value in the "variables" tab?
    1506354067385880596-image.png