Wondering if anyone has tried to set `secret` usin...
# ask-community
e
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
Hey @Eldho Suresh, just checking that you’re using the code snippet in that example?
e
@Kevin Kho Yes - using the same code from documentation in
Interactive API
k
I can’t get the syntax right. Will ask the team tom
🙏 1
a
@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
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
@Anna Geller Thank you - that works.
👍 1