https://prefect.io logo
e

Eldho Suresh

10/15/2021, 2:39 AM
Wondering if anyone has tried to set
secret
using GraphQL mutation https://docs.prefect.io/orchestration/concepts/secrets.html#graphql It’s erroring out for me -
Copy code
"message": "Expected type JSON!, found \"MY SECRET VALUE\"; Expecting value: line 1 column 1 (char 0)",
k

Kevin Kho

10/15/2021, 4:26 AM
Hey @Eldho Suresh, just checking that you’re using the code snippet in that example?
e

Eldho Suresh

10/15/2021, 4:27 AM
@Kevin Kho Yes - using the same code from documentation in
Interactive API
k

Kevin Kho

10/15/2021, 4:38 AM
I can’t get the syntax right. Will ask the team tom
🙏 1
a

Anna Geller

10/15/2021, 8:57 AM
@Eldho Suresh JSON is tricky. I found in the docs that it’s best to put them as query variables. This seems to work well:
upvote 1
👏 1
z

Zanie

10/15/2021, 2:59 PM
As Anna has mentioned, query variables are essential to getting the JSON escaping to behave correctly for anything complex. Let us know if you have more issues!
e

Eldho Suresh

10/17/2021, 10:57 PM
@Anna Geller Thank you - that works.
👍 1
3 Views