Zach
08/07/2023, 3:54 PMSean Lopp
08/07/2023, 7:21 PMmutation CreateSecret($secretName: String!, $secretValue: String!, $scopes: SecretScopesInput!, $locationNames: [String!]!) {
createSecret(secretName: $secretName, secretValue: $secretValue, scopes: $scopes, locationNames: $locationNames) {
__typename
... on CreateOrUpdateSecretSuccess {
secret {
id
secretName
secretValue
updatedBy {
email
}
updateTimestamp
locationNames
fullDeploymentScope
allBranchDeploymentsScope
specificBranchDeploymentScope
localDeploymentScope
}
}
...on UnauthorizedError {
message
}
...on TooManySecretsError {
message
}
...on InvalidSecretInputError {
message
}
... on PythonError {
message
stack
}
}
}
mutation DeleteSecret($secretId: String!) {
deleteSecret(secretId: $secretId) {
__typename
... on DeleteSecretSuccess {
secretId
}
...on UnauthorizedError {
message
}
... on PythonError {
message
stack
}
}
}
query AllSecretsQuery {
secretsOrError {
__typename
... on Secrets {
secrets {
id
secretName
secretValue
updatedBy {
email
}
updateTimestamp
locationNames
fullDeploymentScope
allBranchDeploymentsScope
specificBranchDeploymentScope
localDeploymentScope
canViewSecretValue
canEditSecret
}
}
...on UnauthorizedError {
message
}
... on PythonError {
message
stack
}
}
}
mutation UpdateSecret($secretId: String!, $secretName: String!, $secretValue: String!, $scopes: SecretScopesInput!, $locationNames: [String!]!) {
updateSecret(secretId: $secretId, secretName: $secretName, secretValue: $secretValue, scopes: $scopes, locationNames: $locationNames) {
__typename
... on CreateOrUpdateSecretSuccess {
secret {
id
secretName
secretValue
updatedBy {
email
}
updateTimestamp
locationNames
fullDeploymentScope
allBranchDeploymentsScope
specificBranchDeploymentScope
localDeploymentScope
}
}
...on UnauthorizedError {
message
}
...on TooManySecretsError {
message
}
...on InvalidSecretInputError {
message
}
... on PythonError {
message
stack
}
}
}
Zach
08/07/2023, 7:24 PMSean Lopp
08/07/2023, 7:24 PMmutation_variables = {
"secretName" = "password"
"secretValue" = "a_secret_password"
"scopes" = jsonencode({
"fullDeploymentScope" = true
"allBranchDeploymentsScope" = true
"localDeploymentScope" = false
})
"locationNames" = jsonencode([
"location1", "location2"
])
Michael Hood
08/28/2023, 10:25 PM