Skip to content

Commit

Permalink
Merge pull request #33 from pluralsh/schema-refresh-jul4
Browse files Browse the repository at this point in the history
Schema refresh
  • Loading branch information
michaeljguarino authored Jul 4, 2024
2 parents c779bda + dcdd0e3 commit a0e1607
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 13 deletions.
85 changes: 72 additions & 13 deletions models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ type RootQueryType {

infrastructureStack(id: ID!): InfrastructureStack

stackDefinition(id: ID!): StackDefinition

infrastructureStacks(after: String, first: Int, before: String, last: Int, q: String, projectId: ID): InfrastructureStackConnection

observabilityProvider(id: ID!): ObservabilityProvider
Expand Down Expand Up @@ -743,9 +745,18 @@ type RootMutationType {

deleteCustomStackRun(id: ID!): CustomStackRun

createStackDefinition(attributes: StackDefinitionAttributes!): StackDefinition

updateStackDefinition(id: ID!, attributes: StackDefinitionAttributes!): StackDefinition

deleteStackDefinition(id: ID!): StackDefinition

"Creates a custom run, with the given command list, to execute w\/in the stack's environment"
onDemandRun(stackId: ID!, commands: [CommandAttributes], context: Json): StackRun

"start a new run from the newest sha in the stack's run history"
triggerRun(id: ID!): StackRun

upsertObservabilityProvider(attributes: ObservabilityProviderAttributes!): ObservabilityProvider

deleteObservabilityProvider(id: ID!): ObservabilityProvider
Expand Down Expand Up @@ -1020,6 +1031,7 @@ enum StackStatus {
enum StackType {
TERRAFORM
ANSIBLE
CUSTOM
}

enum StepStatus {
Expand Down Expand Up @@ -1077,6 +1089,12 @@ input StackAttributes {
"id of an scm connection to use for pr callbacks"
connectionId: ID

"the id of a stack definition to use"
definitionId: ID

"a cron to spawn runs for this stack"
cron: StackCronAttributes

readBindings: [PolicyBindingAttributes]

writeBindings: [PolicyBindingAttributes]
Expand Down Expand Up @@ -1115,6 +1133,14 @@ input StackHookAttributes {
afterStage: StepStage!
}

input StackCronAttributes {
"the crontab to use for spawning stack runs"
crontab: String!

"whether you want to auto approve any changes spawned by the cron worker"
autoApprove: Boolean
}

input StackRunAttributes {
"The status of this run"
status: StackStatus!
Expand Down Expand Up @@ -1205,6 +1231,20 @@ input CommandAttributes {
dir: String
}

input StackDefinitionAttributes {
name: String!
description: String
steps: [CustomStepAttributes]
configuration: StackConfigurationAttributes
}

input CustomStepAttributes {
stage: StepStage
cmd: String!
args: [String]
requireApproval: Boolean
}

type InfrastructureStack {
id: ID

Expand Down Expand Up @@ -1275,6 +1315,12 @@ type InfrastructureStack {
"the git repository you're sourcing IaC from"
repository: GitRepository

"the stack definition in-use by this stack"
definition: StackDefinition

"a cron to spawn runs for this stack"
cron: StackCron

"the actor of this stack (defaults to root console user)"
actor: User

Expand All @@ -1292,6 +1338,14 @@ type InfrastructureStack {
updatedAt: DateTime
}

type StackCron {
"the crontab used to independently spawn runs for this stack"
crontab: String!

"whether you want any cron-derived runs to automatically approve changes"
autoApprove: Boolean
}

"grab-bag of state configuration urls for supported tools"
type StateUrls {
terraform: TerraformStateUrls
Expand Down Expand Up @@ -1435,6 +1489,7 @@ type RunStep {
name: String!
cmd: String!
args: [String!]
requireApproval: Boolean
index: Int!
logs: [RunLogs]
insertedAt: DateTime
Expand Down Expand Up @@ -1510,6 +1565,23 @@ type CustomStackRun {
updatedAt: DateTime
}

type StackDefinition {
id: ID!
name: String!
description: String
configuration: StackConfiguration!
steps: [CustomRunStep]
insertedAt: DateTime
updatedAt: DateTime
}

type CustomRunStep {
cmd: String!
args: [String]
stage: StepStage!
requireApproval: Boolean
}

type StackCommand {
"the executable to call"
cmd: String!
Expand Down Expand Up @@ -2672,6 +2744,7 @@ input ServiceImportAttributes {

input SyncConfigAttributes {
createNamespace: Boolean
enforceNamespace: Boolean
namespaceMetadata: MetadataAttributes
}

Expand Down Expand Up @@ -3105,6 +3178,9 @@ type SyncConfig {
"whether the agent should auto-create the namespace for this service"
createNamespace: Boolean

"Whether to require all resources are placed in the same namespace"
enforceNamespace: Boolean

namespaceMetadata: NamespaceMetadata
}

Expand Down

0 comments on commit a0e1607

Please sign in to comment.