https://prefect.io logo
#prefect-server
Title
# prefect-server
d

David Charles

03/22/2022, 9:38 AM
Hi I’m having a problem setting secrets using GQL (same with Python client):
Copy code
mutation {
  set_secret(input: { name: "FOO", value: "BAR" }) {
    success
  }
}
Result:
Copy code
{
  "errors": [
    {
      "message": "Cannot query field \"set_secret\" on type \"Mutation\".",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    }
  ]
}
Any ideas?
discourse 1
Version info here:
Copy code
{
  "data": {
    "api": {
      "backend": "SERVER",
      "mode": "normal",
      "version": "2022.01.25",
      "core_version": "0.15.13",
      "release_timestamp": "2022-01-25T17:43:26Z"
    }
  }
}
Python client:
Copy code
import prefect
prefect.__version__
'0.15.13'
a

Anna Geller

03/22/2022, 9:53 AM
Hi @David Charles, the Secrets stored in the backend are only available using Prefect Cloud, i.e. you can't use those on Prefect Server since this requires a managed service to ensure those Secrets are properly encrypted and stored in a secure manner. On Server you can leverage local Secrets. Check out this Discourse topic to see how you can set local Secrets https://discourse.prefect.io/t/how-to-set-secrets-e-g-github-access-token-on-server/70
d

David Charles

03/22/2022, 9:54 AM
Ahhhh - thanks (thought I’d lost the plot)
Understood - thanks for the snappy reply @Anna Geller 🙂
👍 3
10 Views