Thread
#prefect-community
    e

    Eldho Suresh

    11 months ago
    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 -
    "message": "Expected type JSON!, found \"MY SECRET VALUE\"; Expecting value: line 1 column 1 (char 0)",
    Kevin Kho

    Kevin Kho

    11 months ago
    Hey @Eldho Suresh, just checking that you’re using the code snippet in that example?
    e

    Eldho Suresh

    11 months ago
    @Kevin Kho Yes - using the same code from documentation in
    Interactive API
    Kevin Kho

    Kevin Kho

    11 months ago
    I can’t get the syntax right. Will ask the team tom
    Anna Geller

    Anna Geller

    11 months ago
    @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:
    Michael Adkins

    Michael Adkins

    11 months ago
    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

    11 months ago
    @Anna Geller Thank you - that works.