From 96b05602eac17a514296d6e2d5345861d0d7f0c5 Mon Sep 17 00:00:00 2001 From: Frode Sundby Date: Fri, 13 Nov 2026 09:43:23 +0100 Subject: [PATCH 1/2] wip(postgres): retire branch GraphQL contracts Remove public branch reads and compatibility schema, preserve historical activities and genuine Postgres issues, and build gRPC inventory directly from Postgres. Internal main-view/readiness helper cleanup remains on this branch before the final rollout. --- integration_tests/create_postgres_access.lua | 28 +- .../create_postgres_admin_access.lua | 2 +- .../create_postgres_maintain_access.lua | 2 +- integration_tests/label_selectors.lua | 26 +- integration_tests/postgres_audit_log.lua | 8 +- .../postgres_branch_selection.lua | 37 +- integration_tests/postgres_branches.lua | 89 +- integration_tests/postgres_dual_read.lua | 31 +- integration_tests/postgres_issues.lua | 12 +- integration_tests/postgres_workloads.lua | 36 +- internal/graph/gengql/complexity.go | 9 - internal/graph/gengql/issues.generated.go | 266 - .../graph/gengql/persistence.generated.go | 8 - internal/graph/gengql/postgres.generated.go | 5439 +++++------------ internal/graph/gengql/root_.generated.go | 658 +- internal/graph/gengql/schema.generated.go | 14 - internal/graph/gengql/teams.generated.go | 69 - internal/graph/issues.resolvers.go | 13 - internal/graph/postgres.resolvers.go | 110 +- internal/graph/postgres_schema_test.go | 26 +- internal/graph/schema/issues.graphqls | 18 - internal/graph/schema/postgres.graphqls | 197 +- .../grpc/grpcdatabase/postgres_branch_test.go | 24 - internal/grpc/grpcdatabase/postgres_test.go | 15 + internal/grpc/grpcdatabase/server.go | 16 +- internal/issue/model.go | 10 - .../watchers/postgres_contract_test.go | 3 - internal/persistence/postgres/models.go | 8 - internal/persistence/postgres/models_test.go | 7 - internal/persistence/postgres/node.go | 17 +- .../postgres/physical_status_test.go | 4 +- internal/persistence/postgres/queries.go | 9 - 32 files changed, 1812 insertions(+), 5399 deletions(-) delete mode 100644 internal/grpc/grpcdatabase/postgres_branch_test.go create mode 100644 internal/grpc/grpcdatabase/postgres_test.go diff --git a/integration_tests/create_postgres_access.lua b/integration_tests/create_postgres_access.lua index 32f9f714f..f5b4afd4e 100644 --- a/integration_tests/create_postgres_access.lua +++ b/integration_tests/create_postgres_access.lua @@ -12,15 +12,13 @@ mainTeam:addMember(staleUser) Helper.readK8sResources("k8s_resources/create_postgres_access") -Test.gql("Postgres branches use local names and stay scoped to their Postgres", function(t) +Test.gql("Postgres access targets the logical database", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "someteamname") { environment(name: "dev") { - postgres(name: "foobar") { activeBranch { name } branches { nodes { name postgres { name } } } branch(name: "main") { name postgres { name } } } + postgres(name: "foobar") { name state } } } }]] t.check { data = { team = { environment = { postgres = { - activeBranch = { name = "main" }, - branches = { nodes = { { name = "main", postgres = { name = "foobar" } } } }, - branch = { name = "main", postgres = { name = "foobar" } }, + name = "foobar", state = "AVAILABLE", } } } } } end) @@ -29,7 +27,7 @@ Test.gql("Create personal postgres access without authorization", function(t) t.query [[ mutation CreatePostgresAccess { createPostgresAccess(input: { - postgres: "foobar", branch: "main" + postgres: "foobar" environmentName: "dev" teamSlug: "someteamname" accessLevel: READ @@ -58,7 +56,7 @@ Test.gql("Create personal postgres access requires an audit reason", function(t) t.query [[ mutation CreatePostgresAccess { createPostgresAccess(input: { - postgres: "foobar", branch: "main" + postgres: "foobar" environmentName: "dev" teamSlug: "someteamname" accessLevel: READ @@ -86,7 +84,7 @@ Test.gql("Create personal postgres access rejects an unknown instance", function t.query [[ mutation CreatePostgresAccess { createPostgresAccess(input: { - postgres: "foobar", branch: "unknown" + postgres: "unknown" environmentName: "dev" teamSlug: "someteamname" accessLevel: READ @@ -114,7 +112,7 @@ Test.gql("Create personal postgres access rejects a logical Postgres without a p t.addHeader("x-user-email", user:email()) t.query [[ mutation { createPostgresAccess(input: { - postgres: "legacy-only", branch: "main", environmentName: "dev", + postgres: "legacy-only", environmentName: "dev", teamSlug: "someteamname", accessLevel: READ, reason: "Testing missing physical database instance" }) { name } } @@ -130,7 +128,7 @@ Test.gql("Create personal postgres access rejects an unavailable instance", func t.query [[ mutation CreatePostgresAccess { createPostgresAccess(input: { - postgres: "progressing", branch: "main" + postgres: "progressing" environmentName: "dev" teamSlug: "someteamname" accessLevel: READ @@ -159,7 +157,7 @@ Test.gql("Create personal postgres access", function(t) t.query [[ mutation CreatePostgresAccess { createPostgresAccess(input: { - postgres: "foobar", branch: "main" + postgres: "foobar" environmentName: "dev" teamSlug: "someteamname" accessLevel: READWRITE @@ -229,7 +227,7 @@ Test.gql("Requesting access again returns the live access instead of creating an t.addHeader("x-user-email", creatorUser:email()) local request = [[ mutation { createPostgresAccess(input: { - postgres: "foobar", branch: "main", environmentName: "dev", teamSlug: "someteamname", + postgres: "foobar", environmentName: "dev", teamSlug: "someteamname", accessLevel: READWRITE, reason: "Testing personal database access" }) { name expiresAt } } ]] @@ -249,7 +247,7 @@ Test.gql("Changing access level revokes and recreates live access", function(t) for _, level in ipairs({ "READ", "READWRITE" }) do t.query(string.format([[ mutation { createPostgresAccess(input: { - postgres: "foobar", branch: "main", environmentName: "dev", teamSlug: "someteamname", + postgres: "foobar", environmentName: "dev", teamSlug: "someteamname", accessLevel: %s, reason: "Testing personal database access" }) { name expiresAt } } ]], level)) @@ -279,7 +277,7 @@ Test.gql("Personal access rejects retired non-main selection", function(t) reason: "Testing access to a recovered instance" }) { name } } ]] - t.check { data = Null, errors = { { extensions = { field = "branch" }, message = Contains("Could not find PostgresBranch"), path = { "createPostgresAccess" } } } } + t.check { data = Null, errors = { { extensions = { code = "GRAPHQL_VALIDATION_FAILED" }, locations = NotNull(), message = Contains('Field "branch" is not defined') } } } end) Test.gql("PostgresAccess status is visible to authorized team members", function(t) @@ -432,7 +430,7 @@ Test.gql("An expired access is replaced in the same request", function(t) t.addHeader("x-user-email", staleUser:email()) local request = [[ mutation { createPostgresAccess(input: { - postgres: "foobar", branch: "main", environmentName: "dev", teamSlug: "someteamname", + postgres: "foobar", environmentName: "dev", teamSlug: "someteamname", accessLevel: READ, reason: "Testing personal database access" }) { name } } ]] diff --git a/integration_tests/create_postgres_admin_access.lua b/integration_tests/create_postgres_admin_access.lua index d08f0b05b..d391cb604 100644 --- a/integration_tests/create_postgres_admin_access.lua +++ b/integration_tests/create_postgres_admin_access.lua @@ -10,7 +10,7 @@ Helper.readK8sResources("k8s_resources/create_postgres_access") local request = [[ mutation { createPostgresAccess(input: { - postgres: "foobar", branch: "main", environmentName: "dev", teamSlug: "someteamname", + postgres: "foobar", environmentName: "dev", teamSlug: "someteamname", accessLevel: ADMIN, reason: "Creating an application schema", ttl: "30m" }) { name expiresAt } } ]] diff --git a/integration_tests/create_postgres_maintain_access.lua b/integration_tests/create_postgres_maintain_access.lua index b70dea73c..2304d197c 100644 --- a/integration_tests/create_postgres_maintain_access.lua +++ b/integration_tests/create_postgres_maintain_access.lua @@ -10,7 +10,7 @@ Helper.readK8sResources("k8s_resources/create_postgres_access") local request = [[ mutation { createPostgresAccess(input: { - postgres: "foobar", branch: "main", environmentName: "dev", teamSlug: "someteamname", + postgres: "foobar", environmentName: "dev", teamSlug: "someteamname", accessLevel: MAINTAIN, reason: "Investigating database maintenance", ttl: "30m" }) { name expiresAt } } ]] diff --git a/integration_tests/label_selectors.lua b/integration_tests/label_selectors.lua index 053fed1eb..528a32f2f 100644 --- a/integration_tests/label_selectors.lua +++ b/integration_tests/label_selectors.lua @@ -145,7 +145,7 @@ Test.gql("Check all Postgres instances (no filter)", function(t) } nodes { name - branches { nodes { name labels { key value } } } + labels { key value } } } } @@ -159,9 +159,9 @@ Test.gql("Check all Postgres instances (no filter)", function(t) postgreses = { pageInfo = { totalCount = 3 }, nodes = { - { name = "postgres-one", branches = { nodes = { { name = "main", labels = { { key = "priority", value = "high" }, { key = "tag", value = "target" } } } } } }, - { name = "postgres-three", branches = { nodes = { { name = "main", labels = { { key = "tag", value = "other" } } } } } }, - { name = "postgres-two", branches = { nodes = { { name = "main", labels = { { key = "tag", value = "target" } } } } } }, + { name = "postgres-one", labels = { { key = "priority", value = "high" }, { key = "tag", value = "target" } } }, + { name = "postgres-three", labels = { { key = "tag", value = "other" } } }, + { name = "postgres-two", labels = { { key = "tag", value = "target" } } }, }, }, }, @@ -169,24 +169,14 @@ Test.gql("Check all Postgres instances (no filter)", function(t) } end) -Test.gql("A branch's labels are available through its Postgres", function(t) +Test.gql("Postgres labels are available on the database", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "labelteam") { environment(name: "dev") { - postgres(name: "postgres-one") { branch(name: "main") { labels { key value } } } + postgres(name: "postgres-one") { labels { key value } } } } }]] - t.check { data = { team = { environment = { postgres = { branch = { labels = { + t.check { data = { team = { environment = { postgres = { labels = { { key = "priority", value = "high" }, { key = "tag", value = "target" }, - } } } } } } } -end) - -Test.gql("The main facade inherits Postgres labels", function(t) - t.addHeader("x-user-email", user:email()) - t.query [[{ team(slug: "labelteam") { environment(name: "dev") { - postgres(name: "postgres-one") { labels { key value } branch(name: "main") { labels { key value } } } - } } }]] - t.check { data = { team = { environment = { postgres = { - labels = { { key = "priority", value = "high" }, { key = "tag", value = "target" } }, branch = { labels = { { key = "priority", value = "high" }, { key = "tag", value = "target" } } }, - } } } } } + } } } } } } end) Test.gql("Check all applications (no filter)", function(t) diff --git a/integration_tests/postgres_audit_log.lua b/integration_tests/postgres_audit_log.lua index 97e6aafbb..6e66ec1c0 100644 --- a/integration_tests/postgres_audit_log.lua +++ b/integration_tests/postgres_audit_log.lua @@ -8,9 +8,9 @@ team:addMember(user) Test.gql("Logical Postgres settings are not fabricated on physical instances", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug:"audit-postgres-team") { environment(name:"dev-gcp") { - postgres(name:"audit-enabled") { branch(name:"main") { name state postgres { name majorVersion } } } + postgres(name:"audit-enabled") { name state majorVersion } } } }]] - t.check { data = { team = { environment = { postgres = { branch = { - name = "main", state = "AVAILABLE", postgres = { name = "audit-enabled", majorVersion = "16" }, - } } } } } } + t.check { data = { team = { environment = { postgres = { + name = "audit-enabled", state = "AVAILABLE", majorVersion = "16", + } } } } } end) diff --git a/integration_tests/postgres_branch_selection.lua b/integration_tests/postgres_branch_selection.lua index e60b07785..0b22e0ecb 100644 --- a/integration_tests/postgres_branch_selection.lua +++ b/integration_tests/postgres_branch_selection.lua @@ -6,35 +6,27 @@ Helper.readK8sResources("k8s_resources/postgres_branch_selection") Test.gql("The main facade includes omitted and explicit main consumers", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "pg-selection-team") { environment(name: "dev") { - postgres(name: "orders") { branch(name: "main") { workloads { nodes { __typename name } } } } + postgres(name: "orders") { workloads { nodes { workload { __typename ... on Application { name } ... on Job { name } } } } } } } }]] - t.check { data = { team = { environment = { postgres = { branch = { workloads = { nodes = { - { __typename = "Application", name = "following-app" }, - { __typename = "Application", name = "pinned-app" }, - { __typename = "Job", name = "pinned-job" }, - } } } } } } } } + t.check { data = { team = { environment = { postgres = { workloads = { nodes = { + { workload = { __typename = "Application", name = "following-app" } }, + { workload = { __typename = "Application", name = "pinned-app" } }, + { workload = { __typename = "Job", name = "pinned-job" } }, + } } } } } } } end) Test.gql("Stale active branch metadata never selects a physical target", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "pg-selection-team") { environment(name: "dev") { - postgres(name: "orders") { activeBranch { name } branches { nodes { name } } } - application(name: "following-app") { postgreses { nodes { branch { name } postgres { name } } } } + postgres(name: "orders") { name state } + application(name: "following-app") { postgreses { nodes { postgres { name } } } } } } }]] t.check { data = { team = { environment = { - postgres = { activeBranch = { name = "main" }, branches = { nodes = { { name = "main" } } } }, - application = { postgreses = { nodes = { { branch = { name = "main" }, postgres = { name = "orders" } } } } }, + postgres = { name = "orders", state = "PROGRESSING" }, + application = { postgreses = { nodes = { { postgres = { name = "orders" } } } } }, } } } } end) -Test.gql("Retired non-main lookups do not fall back to main", function(t) - t.addHeader("x-user-email", user:email()) - t.query [[{ team(slug: "pg-selection-team") { environment(name: "dev") { - postgres(name: "orders") { branch(name: "green") { name } } - } } }]] - t.check { data = Null, errors = { { locations = NotNull(), message = Contains("orders/green"), path = { "team", "environment", "postgres", "branch" } } } } -end) - Test.gql("Postgres pagination is validated when a workload has no uses", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "pg-selection-team") { environment(name: "dev") { @@ -47,13 +39,12 @@ Test.gql("A provisioning database retains workload relations without branch obje t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "pg-selection-team") { environment(name: "dev") { postgres(name: "missing-branch") { - state activeBranch { name state } branch(name: "main") { name state } - workloads { pageInfo { totalCount } nodes { branch { name } workload { ... on Application { name } } } } + state + workloads { pageInfo { totalCount } nodes { workload { ... on Application { name } } } } } } } }]] t.check { data = { team = { environment = { postgres = { - state = "PROGRESSING", branch = { name = "main", state = "PROGRESSING" }, - activeBranch = { name = "main", state = "PROGRESSING" }, - workloads = { pageInfo = { totalCount = 1 }, nodes = { { branch = { name = "main" }, workload = { name = "missing-branch-app" } } } }, + state = "PROGRESSING", + workloads = { pageInfo = { totalCount = 1 }, nodes = { { workload = { name = "missing-branch-app" } } } }, } } } } } end) diff --git a/integration_tests/postgres_branches.lua b/integration_tests/postgres_branches.lua index 49696d8cd..7e91a446a 100644 --- a/integration_tests/postgres_branches.lua +++ b/integration_tests/postgres_branches.lua @@ -10,7 +10,6 @@ local workloadFields = [[fragment PostgresWorkloadFields on PostgresWorkload { ... on Application { __typename id name team { slug } teamEnvironment { environment { name } } } ... on Job { __typename id name team { slug } teamEnvironment { environment { name } } } } - branch { id name team { slug } teamEnvironment { environment { name } } } }]] local function workloadNode(workloadType, name, teamSlug, environmentName) @@ -24,28 +23,20 @@ local function workloadNode(workloadType, name, teamSlug, environmentName) team = { slug = teamSlug }, teamEnvironment = { environment = { name = environmentName } }, }, - branch = { - id = NotNull(), - name = "main", - team = { slug = teamSlug }, - teamEnvironment = { environment = { name = environmentName } }, - }, } end -Test.gql("List Postgres and their branches together", function(t) +Test.gql("List Postgres databases with their observed states", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "someteamname") { postgreses(filter: { environments: ["dev"] }) { nodes { - name majorVersion activeBranch { name } branches { nodes { name state postgres { name } } } + name majorVersion state } } } }]] t.check { data = { team = { postgreses = { nodes = { - { name = "another-db", majorVersion = "16", activeBranch = { name = "main" }, branches = { nodes = { { name = "main", state = "AVAILABLE", postgres = { name = "another-db" } } } } }, - { name = "broken", majorVersion = "17", activeBranch = { name = "main" }, branches = { nodes = { { name = "main", state = "DEGRADED", postgres = { name = "broken" } } } } }, - { name = "foobar", majorVersion = "17", activeBranch = { name = "main" }, branches = { nodes = { - { name = "main", state = "AVAILABLE", postgres = { name = "foobar" } }, - } } }, - { name = "with-audit", majorVersion = "16", activeBranch = { name = "main" }, branches = { nodes = { { name = "main", state = "AVAILABLE", postgres = { name = "with-audit" } } } } }, - { name = "without-audit", majorVersion = "15", activeBranch = { name = "main" }, branches = { nodes = { { name = "main", state = "AVAILABLE", postgres = { name = "without-audit" } } } } }, + { name = "another-db", majorVersion = "16", state = "AVAILABLE" }, + { name = "broken", majorVersion = "17", state = "DEGRADED" }, + { name = "foobar", majorVersion = "17", state = "AVAILABLE" }, + { name = "with-audit", majorVersion = "16", state = "AVAILABLE" }, + { name = "without-audit", majorVersion = "15", state = "AVAILABLE" }, } } } } } end) @@ -64,51 +55,36 @@ end) Test.gql("Retrieve logical Postgres and selected physical instance separately", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug:"someteamname") { environment(name:"dev") { - postgres(name:"foobar") { name activeBranch { name } majorVersion highAvailability resources { cpu memory diskSize } branch(name:"main") { name postgres { name } teamEnvironment { name } } branches { nodes { name state } } } + postgres(name:"foobar") { name state majorVersion highAvailability resources { cpu memory diskSize } teamEnvironment { name } } } } }]] t.check { data = { team = { environment = { - postgres = { name = "foobar", activeBranch = { name = "main" }, majorVersion = "17", highAvailability = false, resources = { cpu = "100m", memory = "2Gi", diskSize = "2Gi" }, branch = { name = "main", postgres = { name = "foobar" }, teamEnvironment = { name = "dev" } }, branches = { nodes = { - { name = "main", state = "AVAILABLE" }, - } } }, + postgres = { name = "foobar", state = "AVAILABLE", majorVersion = "17", highAvailability = false, resources = { cpu = "100m", memory = "2Gi", diskSize = "2Gi" }, teamEnvironment = { name = "dev" } }, } } } } end) Test.gql("An unrecoverable Postgres is degraded through the main facade", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug:"someteamname") { environment(name:"dev") { - postgres(name:"broken") { branch(name:"main") { name state } } + postgres(name:"broken") { name state } } } }]] t.check { data = { team = { environment = { - postgres = { branch = { name = "main", state = "DEGRADED" } }, + postgres = { name = "broken", state = "DEGRADED" }, } } } } end) -Test.gql("Branch state facets are scoped to their Postgres", function(t) - t.addHeader("x-user-email", user:email()) - t.query [[{ team(slug:"someteamname") { environment(name:"dev") { postgres(name:"foobar") { - branches { nodes { name state } facets { states { state count } } } - } } } }]] - t.check { data = { team = { environment = { postgres = { branches = { - nodes = { - { name = "main", state = "AVAILABLE" }, - }, - facets = { states = { { state = "AVAILABLE", count = 1 } } }, - } } } } } } -end) - Test.gql("A workload Postgres use follows the active physical instance", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug:"someteamname") { environment(name:"dev") { - application(name:"app-with-postgres") { postgreses { nodes { postgres { name activeBranch { name } } branch { name } } } } - postgres(name:"foobar") { branch(name:"main") { workloads { nodes { __typename name } } } } + application(name:"app-with-postgres") { postgreses { nodes { postgres { name } } } } + postgres(name:"foobar") { workloads { nodes { workload { __typename ... on Application { name } ... on Job { name } } } } } } } }]] t.check { data = { team = { environment = { - application = { postgreses = { nodes = { { postgres = { name = "foobar", activeBranch = { name = "main" } }, branch = { name = "main" } } } } }, - postgres = { branch = { workloads = { nodes = { - { __typename = "Application", name = "app-with-postgres" }, - { __typename = "Application", name = "app-with-postgres-2" }, - { __typename = "Job", name = "job-with-postgres" }, - } } } }, + application = { postgreses = { nodes = { { postgres = { name = "foobar" } } } } }, + postgres = { workloads = { nodes = { + { workload = { __typename = "Application", name = "app-with-postgres" } }, + { workload = { __typename = "Application", name = "app-with-postgres-2" } }, + { workload = { __typename = "Job", name = "job-with-postgres" } }, + } } }, } } } } end) @@ -205,10 +181,9 @@ end) Test.gql("Postgres configuration exposes explicitly configured parameters in name order", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "someteamname") { environment(name: "dev") { postgres(name: "foobar") { - activeBranch { name configuration { parameters { name value } } } + configuration { parameters { name value } } } } } }]] - t.check { data = { team = { environment = { postgres = { activeBranch = { - name = "main", + t.check { data = { team = { environment = { postgres = { configuration = { parameters = { { name = "bgwriter_lru_maxpages", value = "200" }, { name = "checkpoint_timeout", value = "10min" }, @@ -230,7 +205,7 @@ Test.gql("Postgres configuration exposes explicitly configured parameters in nam { name = "wal_compression", value = "zstd" }, { name = "work_mem", value = "32MB" }, } }, - } } } } } } + } } } } } end) Test.gql("Postgres configuration is scoped to branch, database, team and environment", function(t) @@ -238,23 +213,23 @@ Test.gql("Postgres configuration is scoped to branch, database, team and environ t.query [[{ team(slug: "someteamname") { dev: environment(name: "dev") { - postgres(name: "broken") { branch(name: "main") { configuration { parameters { name value } } } } - empty: postgres(name: "another-db") { activeBranch { configuration { parameters { name value } } } } - missing: postgres(name: "without-audit") { name activeBranch { name configuration { parameters { name value } } } } + postgres(name: "broken") { configuration { parameters { name value } } } + empty: postgres(name: "another-db") { configuration { parameters { name value } } } + missing: postgres(name: "without-audit") { name configuration { parameters { name value } } } } - staging: environment(name: "staging") { postgres(name: "foobar") { activeBranch { configuration { parameters { name value } } } } } + staging: environment(name: "staging") { postgres(name: "foobar") { configuration { parameters { name value } } } } } - other: team(slug: "postgres-other-team") { environment(name: "dev") { postgres(name: "foobar") { activeBranch { configuration { parameters { name value } } } } } } + other: team(slug: "postgres-other-team") { environment(name: "dev") { postgres(name: "foobar") { configuration { parameters { name value } } } } } }]] t.check { data = { team = { dev = { - postgres = { branch = { configuration = { parameters = { { name = "shared_buffers", value = "128MB" } } } } }, - empty = { activeBranch = { configuration = { parameters = {} } } }, - missing = { name = "without-audit", activeBranch = { name = "main", configuration = Null } }, + postgres = { configuration = { parameters = { { name = "shared_buffers", value = "128MB" } } } }, + empty = { configuration = { parameters = {} } }, + missing = { name = "without-audit", configuration = Null }, }, - staging = { postgres = { activeBranch = { configuration = { parameters = { { name = "work_mem", value = "8MB" } } } } } }, + staging = { postgres = { configuration = { parameters = { { name = "work_mem", value = "8MB" } } } } }, }, - other = { environment = { postgres = { activeBranch = { configuration = { parameters = { { name = "work_mem", value = "16MB" } } } } } } }, + other = { environment = { postgres = { configuration = { parameters = { { name = "work_mem", value = "16MB" } } } } } }, } } end) diff --git a/integration_tests/postgres_dual_read.lua b/integration_tests/postgres_dual_read.lua index f24b29da3..3d51a306b 100644 --- a/integration_tests/postgres_dual_read.lua +++ b/integration_tests/postgres_dual_read.lua @@ -14,29 +14,24 @@ Test.gql("Direct Postgres fields read both legacy and directly owned databases", } } } } } end) -Test.gql("Legacy main queries still work without a Kubernetes branch", function(t) +Test.gql("Direct Postgres metadata works without a Kubernetes branch", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "pg-dual-read-team") { environment(name: "dev") { postgres(name: "orders") { - id createdAt earliestRestoreTime issues { pageInfo { totalCount } } activeBranch { id name state } - branch(name: "main") { id name state postgres { id name } } - branches { pageInfo { totalCount } nodes { id name state } } + id name state createdAt earliestRestoreTime issues { pageInfo { totalCount } } } } } }]] t.check { data = { team = { environment = { postgres = { id = Save("directPostgresID"), createdAt = "2026-01-02T03:04:05Z", earliestRestoreTime = Null, issues = { pageInfo = { totalCount = 0 } }, - activeBranch = { id = Save("directMainID"), name = "main", state = "AVAILABLE" }, - branch = { id = NotNull(), name = "main", state = "AVAILABLE", postgres = { id = NotNull(), name = "orders" } }, - branches = { pageInfo = { totalCount = 1 }, nodes = { { id = NotNull(), name = "main", state = "AVAILABLE" } } }, + name = "orders", state = "AVAILABLE", } } } } } end) -Test.gql("The legacy main node keeps its identity and GraphQL type", function(t) +Test.gql("The Postgres node keeps its identity and GraphQL type", function(t) t.addHeader("x-user-email", user:email()) - t.query(string.format([[{ node(id: "%s") { __typename ... on PostgresBranch { - id name postgres { id name } configuration { parameters { name value } } - } } }]], State.directMainID)) + t.query(string.format([[{ node(id: "%s") { __typename ... on Postgres { + id name configuration { parameters { name value } } + } } }]], State.directPostgresID)) t.check { data = { node = { - __typename = "PostgresBranch", id = State.directMainID, name = "main", - postgres = { id = State.directPostgresID, name = "orders" }, + __typename = "Postgres", id = State.directPostgresID, name = "orders", configuration = { parameters = { { name = "work_mem", value = "16MB" } } }, } } } end) @@ -44,10 +39,10 @@ end) Test.gql("Workload queries resolve a virtual main without omitting the database", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "pg-dual-read-team") { environment(name: "dev") { application(name: "consumer") { - postgreses { nodes { postgres { name state } branch { name state } } } + postgreses { nodes { postgres { name state } } } } } } }]] t.check { data = { team = { environment = { application = { postgreses = { nodes = { - { postgres = { name = "orders", state = "AVAILABLE" }, branch = { name = "main", state = "AVAILABLE" } }, + { postgres = { name = "orders", state = "AVAILABLE" } }, } } } } } } } end) @@ -72,15 +67,15 @@ Test.gql("Personal access can omit branch before and after direct ownership", fu t.check { data = { createPostgresAccess = { name = Save("personalAccessName"), expiresAt = Save("personalAccessExpiry") } } } -- Explicit legacy main and omitted branch refer to the same live grant. t.query(string.format([[mutation { createPostgresAccess(input: { - postgres: "%s", branch: "main", teamSlug: "pg-dual-read-team", environmentName: "dev", + postgres: "%s", teamSlug: "pg-dual-read-team", environmentName: "dev", accessLevel: READ, reason: "Testing branchless personal database access" }) { name expiresAt } }]], postgresName)) t.check { data = { createPostgresAccess = { name = State.personalAccessName, expiresAt = State.personalAccessExpiry } } } t.query(string.format([[{ team(slug: "pg-dual-read-team") { environment(name: "dev") { - postgresAccess(name: "%s") { state postgres { name } postgresBranch { name postgres { name } } } + postgresAccess(name: "%s") { state postgres { name } } } } }]], State.personalAccessName)) t.check { data = { team = { environment = { postgresAccess = { - state = "PENDING", postgres = { name = postgresName }, postgresBranch = { name = "main", postgres = { name = postgresName } }, + state = "PENDING", postgres = { name = postgresName }, } } } } } end end) diff --git a/integration_tests/postgres_issues.lua b/integration_tests/postgres_issues.lua index bdff641e3..8eda479a7 100644 --- a/integration_tests/postgres_issues.lua +++ b/integration_tests/postgres_issues.lua @@ -58,14 +58,13 @@ Test.gql("Postgres issues are scoped to the logical database", function(t) pageInfo { totalCount } nodes { __typename } facets { resourceTypes { resourceType count } issueTypes { issueType count } } } - main: branch(name: "main") { issues { pageInfo { totalCount } } } } other: postgres(name: "another-db") { - branch(name: "main") { issues { pageInfo { totalCount } } } + issues { pageInfo { totalCount } } } } staging: environment(name: "staging") { - postgres(name: "foobar") { branch(name: "main") { issues { pageInfo { totalCount } } } } + postgres(name: "foobar") { issues { pageInfo { totalCount } } } } } other: team(slug: "postgres-other-team") { @@ -83,11 +82,10 @@ Test.gql("Postgres issues are scoped to the logical database", function(t) issueTypes = { { issueType = "POSTGRES", count = 1 } }, }, }, - main = { issues = { pageInfo = { totalCount = 1 } } }, }, - other = { branch = { issues = { pageInfo = { totalCount = 0 } } } }, + other = { issues = { pageInfo = { totalCount = 0 } } }, }, - staging = { postgres = { branch = { issues = { pageInfo = { totalCount = 0 } } } } }, + staging = { postgres = { issues = { pageInfo = { totalCount = 0 } } } }, }, other = { issues = { pageInfo = { totalCount = 0 } } }, } } @@ -108,7 +106,7 @@ Test.gql("Old stored rows are exposed as PostgresIssue with the same Node ID", f ... on PostgresIssue { id postgres { name teamEnvironment { name team { slug } } } } } team(slug: "someteamname") { - issues(filter: { issueType: POSTGRES_BRANCH }) { pageInfo { totalCount } nodes { __typename ... on PostgresIssue { postgres { name } } } } + issues(filter: { resourceName: "broken-main-69d0ff6e" }) { pageInfo { totalCount } nodes { __typename ... on PostgresIssue { postgres { name } } } } } }]], State.postgres_issue_id)) t.check { data = { diff --git a/integration_tests/postgres_workloads.lua b/integration_tests/postgres_workloads.lua index ea34b97f9..875ba21a2 100644 --- a/integration_tests/postgres_workloads.lua +++ b/integration_tests/postgres_workloads.lua @@ -8,7 +8,6 @@ local workloadFields = [[fragment PostgresWorkloadFields on PostgresWorkload { ... on Application { __typename id name team { slug } teamEnvironment { environment { name } } } ... on Job { __typename id name team { slug } teamEnvironment { environment { name } } } } - branch { id name } }]] local function workloadNode(workloadType, name, branch) @@ -20,25 +19,24 @@ local function workloadNode(workloadType, name, branch) team = { slug = "postgres-workload-team" }, teamEnvironment = { environment = { name = "dev" } }, }, - branch = { id = NotNull(), name = branch }, } end Test.gql("Application and job Postgres uses expose spec fields and resolved resources", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "postgres-workload-team") { environment(name: "dev") { - application(name: "consumer") { postgreses { pageInfo { totalCount } nodes { envPrefix role branch { name } postgres { name activeBranch { name } } } } } - job(name: "scheduled-reader") { postgreses { pageInfo { totalCount } nodes { envPrefix role branch { name } postgres { name activeBranch { name } } } } } + application(name: "consumer") { postgreses { pageInfo { totalCount } nodes { envPrefix role postgres { name } } } } + job(name: "scheduled-reader") { postgreses { pageInfo { totalCount } nodes { envPrefix role postgres { name } } } } } } }]] local applicationPostgreses = { - { envPrefix = "ARCHIVE_", role = "ADMIN", branch = { name = "main" }, postgres = { name = "archive", activeBranch = Null } }, - { envPrefix = Null, role = "READ", branch = { name = "main" }, postgres = { name = "orders", activeBranch = { name = "main" } } }, - { envPrefix = "REPORTS_", role = "ADMIN", branch = { name = "main" }, postgres = { name = "reports", activeBranch = { name = "main" } } }, + { envPrefix = "ARCHIVE_", role = "ADMIN", postgres = { name = "archive" } }, + { envPrefix = Null, role = "READ", postgres = { name = "orders" } }, + { envPrefix = "REPORTS_", role = "ADMIN", postgres = { name = "reports" } }, } local jobPostgreses = { - { envPrefix = "ARCHIVE_", role = "ADMIN", branch = { name = "main" }, postgres = { name = "archive", activeBranch = Null } }, - { envPrefix = Null, role = "ADMIN", branch = { name = "main" }, postgres = { name = "orders", activeBranch = { name = "main" } } }, - { envPrefix = "REPORTS_", role = "ADMIN", branch = { name = "main" }, postgres = { name = "reports", activeBranch = { name = "main" } } }, + { envPrefix = "ARCHIVE_", role = "ADMIN", postgres = { name = "archive" } }, + { envPrefix = Null, role = "ADMIN", postgres = { name = "orders" } }, + { envPrefix = "REPORTS_", role = "ADMIN", postgres = { name = "reports" } }, } t.check { data = { team = { environment = { application = { postgreses = { pageInfo = { totalCount = 3 }, nodes = applicationPostgreses } }, @@ -46,19 +44,19 @@ Test.gql("Application and job Postgres uses expose spec fields and resolved reso } } } } end) -Test.gql("PostgresBranch workloads reference its Postgres through uses.postgres", function(t) +Test.gql("Postgres workloads reference their database through uses.postgres", function(t) t.addHeader("x-user-email", user:email()) t.query [[{ team(slug: "postgres-workload-team") { environment(name: "dev") { - postgres(name: "orders") { branch(name: "main") { workloads { nodes { __typename name } } } } - other: postgres(name: "reports") { branch(name: "main") { workloads { nodes { __typename name } } } } + postgres(name: "orders") { workloads { nodes { workload { __typename ... on Application { name } ... on Job { name } } } } } + other: postgres(name: "reports") { workloads { nodes { workload { __typename ... on Application { name } ... on Job { name } } } } } } } }]] local workloads = { - { __typename = "Application", name = "consumer" }, - { __typename = "Job", name = "scheduled-reader" }, + { workload = { __typename = "Application", name = "consumer" } }, + { workload = { __typename = "Job", name = "scheduled-reader" } }, } t.check { data = { team = { environment = { - postgres = { branch = { workloads = { nodes = workloads } } }, - other = { branch = { workloads = { nodes = workloads } } }, + postgres = { workloads = { nodes = workloads } }, + other = { workloads = { nodes = workloads } }, } } } } end) @@ -67,7 +65,7 @@ Test.gql("Postgres workloads include inactive branch references and databases wi t.query([[{ team(slug: "postgres-workload-team") { environment(name: "dev") { postgres(name: "orders") { workloads(first: 1) { pageInfo { totalCount hasNextPage endCursor } nodes { ...PostgresWorkloadFields } } } reports: postgres(name: "reports") { workloads { pageInfo { totalCount } nodes { ...PostgresWorkloadFields } } } - archive: postgres(name: "archive") { desiredActiveBranch activeBranch { name } workloads { pageInfo { totalCount } nodes { ...PostgresWorkloadFields } } } + archive: postgres(name: "archive") { workloads { pageInfo { totalCount } nodes { ...PostgresWorkloadFields } } } } } }]] .. workloadFields) t.check { data = { team = { environment = { postgres = { workloads = { pageInfo = { totalCount = 2, hasNextPage = true, endCursor = Save("ordersCursor") }, nodes = { @@ -77,7 +75,7 @@ Test.gql("Postgres workloads include inactive branch references and databases wi workloadNode("Application", "consumer", "main"), workloadNode("Job", "scheduled-reader", "main"), } } }, - archive = { desiredActiveBranch = "pending", activeBranch = Null, workloads = { pageInfo = { totalCount = 2 }, nodes = { + archive = { workloads = { pageInfo = { totalCount = 2 }, nodes = { workloadNode("Application", "consumer", "main"), workloadNode("Job", "scheduled-reader", "main"), } } }, diff --git a/internal/graph/gengql/complexity.go b/internal/graph/gengql/complexity.go index b561017f2..2ae731a78 100644 --- a/internal/graph/gengql/complexity.go +++ b/internal/graph/gengql/complexity.go @@ -137,21 +137,12 @@ func NewComplexityRoot() ComplexityRoot { c.Postgres.ActivityLog = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, filter *activitylog.ActivityLogFilter) int { return cursorComplexity(first, last) * childComplexity } - c.Postgres.Branches = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *postgres.PostgresBranchOrder) int { - return cursorComplexity(first, last) * childComplexity - } c.Postgres.Issues = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *issue.IssueOrder, filter *issue.ResourceIssueFilter) int { return cursorComplexity(first, last) * childComplexity } c.Postgres.Workloads = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) int { return cursorComplexity(first, last) * childComplexity } - c.PostgresBranch.Issues = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *issue.IssueOrder, filter *issue.ResourceIssueFilter) int { - return cursorComplexity(first, last) * childComplexity - } - c.PostgresBranch.Workloads = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) int { - return cursorComplexity(first, last) * childComplexity - } c.Query.ActivityLog = func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, filter *activitylog.TenantActivityLogFilter) int { return cursorComplexity(first, last) * childComplexity } diff --git a/internal/graph/gengql/issues.generated.go b/internal/graph/gengql/issues.generated.go index e012c4743..5ccd85ad8 100644 --- a/internal/graph/gengql/issues.generated.go +++ b/internal/graph/gengql/issues.generated.go @@ -87,11 +87,6 @@ type OpenSearchIssueResolver interface { OpenSearch(ctx context.Context, obj *issue.OpenSearchIssue) (*opensearch.OpenSearch, error) } -type PostgresBranchIssueResolver interface { - TeamEnvironment(ctx context.Context, obj *issue.PostgresBranchIssue) (*team.TeamEnvironment, error) - - Branch(ctx context.Context, obj *issue.PostgresBranchIssue) (*postgres.PostgresBranch, error) -} type PostgresIssueResolver interface { TeamEnvironment(ctx context.Context, obj *issue.PostgresIssue) (*team.TeamEnvironment, error) @@ -2167,139 +2162,6 @@ func (ec *executionContext) fieldContext_OpenSearchIssue_event(_ context.Context return graphql.NewScalarFieldContext("OpenSearchIssue", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchIssue_id(ctx context.Context, field graphql.CollectedField, obj *issue.PostgresBranchIssue) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchIssue_id(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.ID, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchIssue_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchIssue", field, false, false, errors.New("field of type ID does not have child fields")) -} - -func (ec *executionContext) _PostgresBranchIssue_teamEnvironment(ctx context.Context, field graphql.CollectedField, obj *issue.PostgresBranchIssue) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchIssue_teamEnvironment(ctx, field) - }, - func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranchIssue().TeamEnvironment(ctx, obj) - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *team.TeamEnvironment) graphql.Marshaler { - return ec.marshalNTeamEnvironment2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋteamᚐTeamEnvironment(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchIssue_teamEnvironment(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchIssue", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_TeamEnvironment(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresBranchIssue_severity(ctx context.Context, field graphql.CollectedField, obj *issue.PostgresBranchIssue) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchIssue_severity(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Severity, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v issue.Severity) graphql.Marshaler { - return ec.marshalNSeverity2githubᚗcomᚋnaisᚋapiᚋinternalᚋissueᚐSeverity(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchIssue_severity(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchIssue", field, false, false, errors.New("field of type Severity does not have child fields")) -} - -func (ec *executionContext) _PostgresBranchIssue_message(ctx context.Context, field graphql.CollectedField, obj *issue.PostgresBranchIssue) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchIssue_message(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Message, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchIssue_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchIssue", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresBranchIssue_branch(ctx context.Context, field graphql.CollectedField, obj *issue.PostgresBranchIssue) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchIssue_branch(ctx, field) - }, - func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranchIssue().Branch(ctx, obj) - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchIssue_branch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchIssue", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) - }, - } - return fc, nil -} - func (ec *executionContext) _PostgresIssue_id(ctx context.Context, field graphql.CollectedField, obj *issue.PostgresIssue) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -3719,13 +3581,6 @@ func (ec *executionContext) _Issue(ctx context.Context, sel ast.SelectionSet, ob return graphql.Null } return ec._PostgresIssue(ctx, sel, obj) - case issue.PostgresBranchIssue: - return ec._PostgresBranchIssue(ctx, sel, &obj) - case *issue.PostgresBranchIssue: - if obj == nil { - return graphql.Null - } - return ec._PostgresBranchIssue(ctx, sel, obj) case issue.OpenSearchIssue: return ec._OpenSearchIssue(ctx, sel, &obj) case *issue.OpenSearchIssue: @@ -5446,127 +5301,6 @@ func (ec *executionContext) _OpenSearchIssue(ctx context.Context, sel ast.Select return out } -var postgresBranchIssueImplementors = []string{"PostgresBranchIssue", "Issue", "Node"} - -func (ec *executionContext) _PostgresBranchIssue(ctx context.Context, sel ast.SelectionSet, obj *issue.PostgresBranchIssue) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchIssueImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchIssue") - case "id": - out.Values[i] = ec._PostgresBranchIssue_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "teamEnvironment": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresBranchIssue_teamEnvironment(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "severity": - out.Values[i] = ec._PostgresBranchIssue_severity(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "message": - out.Values[i] = ec._PostgresBranchIssue_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "branch": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresBranchIssue_branch(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - var postgresIssueImplementors = []string{"PostgresIssue", "Issue", "Node"} func (ec *executionContext) _PostgresIssue(ctx context.Context, sel ast.SelectionSet, obj *issue.PostgresIssue) graphql.Marshaler { diff --git a/internal/graph/gengql/persistence.generated.go b/internal/graph/gengql/persistence.generated.go index 273558efc..27899e8a7 100644 --- a/internal/graph/gengql/persistence.generated.go +++ b/internal/graph/gengql/persistence.generated.go @@ -12,7 +12,6 @@ import ( "github.com/nais/api/internal/persistence/bucket" "github.com/nais/api/internal/persistence/kafkatopic" "github.com/nais/api/internal/persistence/opensearch" - "github.com/nais/api/internal/persistence/postgres" "github.com/nais/api/internal/persistence/sqlinstance" "github.com/nais/api/internal/persistence/valkey" "github.com/vektah/gqlparser/v2/ast" @@ -72,13 +71,6 @@ func (ec *executionContext) _Persistence(ctx context.Context, sel ast.SelectionS return graphql.Null } return ec._SqlDatabase(ctx, sel, obj) - case postgres.PostgresBranch: - return ec._PostgresBranch(ctx, sel, &obj) - case *postgres.PostgresBranch: - if obj == nil { - return graphql.Null - } - return ec._PostgresBranch(ctx, sel, obj) case kafkatopic.KafkaTopic: return ec._KafkaTopic(ctx, sel, &obj) case *kafkatopic.KafkaTopic: diff --git a/internal/graph/gengql/postgres.generated.go b/internal/graph/gengql/postgres.generated.go index 4e9ed50d9..0f9a35e5c 100644 --- a/internal/graph/gengql/postgres.generated.go +++ b/internal/graph/gengql/postgres.generated.go @@ -35,10 +35,7 @@ type PostgresResolver interface { EarliestRestoreTime(ctx context.Context, obj *postgres.Postgres) (*time.Time, error) Issues(ctx context.Context, obj *postgres.Postgres, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *issue.IssueOrder, filter *issue.ResourceIssueFilter) (*issue.IssueConnection, error) - ActiveBranch(ctx context.Context, obj *postgres.Postgres) (*postgres.PostgresBranch, error) Workloads(ctx context.Context, obj *postgres.Postgres, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) (*pagination.Connection[*postgres.PostgresWorkload], error) - Branch(ctx context.Context, obj *postgres.Postgres, name string) (*postgres.PostgresBranch, error) - Branches(ctx context.Context, obj *postgres.Postgres, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *postgres.PostgresBranchOrder) (*pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter], error) ActivityLog(ctx context.Context, obj *postgres.Postgres, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, filter *activitylog.ActivityLogFilter) (*activitylog.ActivityLogEntryConnection, error) } @@ -46,126 +43,17 @@ type PostgresAccessResolver interface { Team(ctx context.Context, obj *postgres.PostgresAccess) (*team.Team, error) TeamEnvironment(ctx context.Context, obj *postgres.PostgresAccess) (*team.TeamEnvironment, error) Postgres(ctx context.Context, obj *postgres.PostgresAccess) (*postgres.Postgres, error) - PostgresBranch(ctx context.Context, obj *postgres.PostgresAccess) (*postgres.PostgresBranch, error) Connection(ctx context.Context, obj *postgres.PostgresAccess) (*postgres.PostgresAccessConnectionDetails, error) } -type PostgresBranchResolver interface { - EarliestRestoreTime(ctx context.Context, obj *postgres.PostgresBranch) (*time.Time, error) - - Team(ctx context.Context, obj *postgres.PostgresBranch) (*team.Team, error) - TeamEnvironment(ctx context.Context, obj *postgres.PostgresBranch) (*team.TeamEnvironment, error) - Postgres(ctx context.Context, obj *postgres.PostgresBranch) (*postgres.Postgres, error) - Workloads(ctx context.Context, obj *postgres.PostgresBranch, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) (*pagination.Connection[workload.Workload], error) - - Issues(ctx context.Context, obj *postgres.PostgresBranch, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *issue.IssueOrder, filter *issue.ResourceIssueFilter) (*issue.IssueConnection, error) -} -type PostgresBranchConnectionResolver interface { - Facets(ctx context.Context, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) (*postgres.PostgresBranchFacets, error) -} type PostgresConnectionResolver interface { Facets(ctx context.Context, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (*postgres.PostgresFacets, error) } -type PostgresWorkloadResolver interface { - Branch(ctx context.Context, obj *postgres.PostgresWorkload) (*postgres.PostgresBranch, error) -} // endregion ************************** generated!.gotpl ************************** // region ***************************** args.gotpl ***************************** -func (ec *executionContext) field_PostgresBranch_issues_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { - var err error - args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", - func(ctx context.Context, v any) (*int, error) { - return ec.unmarshalOInt2ᚖint(ctx, v) - }) - if err != nil { - return nil, err - } - args["first"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", - func(ctx context.Context, v any) (*pagination.Cursor, error) { - return ec.unmarshalOCursor2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, v) - }) - if err != nil { - return nil, err - } - args["after"] = arg1 - arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", - func(ctx context.Context, v any) (*int, error) { - return ec.unmarshalOInt2ᚖint(ctx, v) - }) - if err != nil { - return nil, err - } - args["last"] = arg2 - arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", - func(ctx context.Context, v any) (*pagination.Cursor, error) { - return ec.unmarshalOCursor2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, v) - }) - if err != nil { - return nil, err - } - args["before"] = arg3 - arg4, err := graphql.ProcessArgField(ctx, rawArgs, "orderBy", - func(ctx context.Context, v any) (*issue.IssueOrder, error) { - return ec.unmarshalOIssueOrder2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋissueᚐIssueOrder(ctx, v) - }) - if err != nil { - return nil, err - } - args["orderBy"] = arg4 - arg5, err := graphql.ProcessArgField(ctx, rawArgs, "filter", - func(ctx context.Context, v any) (*issue.ResourceIssueFilter, error) { - return ec.unmarshalOResourceIssueFilter2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋissueᚐResourceIssueFilter(ctx, v) - }) - if err != nil { - return nil, err - } - args["filter"] = arg5 - return args, nil -} - -func (ec *executionContext) field_PostgresBranch_workloads_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { - var err error - args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", - func(ctx context.Context, v any) (*int, error) { - return ec.unmarshalOInt2ᚖint(ctx, v) - }) - if err != nil { - return nil, err - } - args["first"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", - func(ctx context.Context, v any) (*pagination.Cursor, error) { - return ec.unmarshalOCursor2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, v) - }) - if err != nil { - return nil, err - } - args["after"] = arg1 - arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", - func(ctx context.Context, v any) (*int, error) { - return ec.unmarshalOInt2ᚖint(ctx, v) - }) - if err != nil { - return nil, err - } - args["last"] = arg2 - arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", - func(ctx context.Context, v any) (*pagination.Cursor, error) { - return ec.unmarshalOCursor2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, v) - }) - if err != nil { - return nil, err - } - args["before"] = arg3 - return args, nil -} - func (ec *executionContext) field_Postgres_activityLog_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -212,66 +100,6 @@ func (ec *executionContext) field_Postgres_activityLog_args(ctx context.Context, return args, nil } -func (ec *executionContext) field_Postgres_branch_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { - var err error - args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "name", - func(ctx context.Context, v any) (string, error) { - return ec.unmarshalNString2string(ctx, v) - }) - if err != nil { - return nil, err - } - args["name"] = arg0 - return args, nil -} - -func (ec *executionContext) field_Postgres_branches_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { - var err error - args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "first", - func(ctx context.Context, v any) (*int, error) { - return ec.unmarshalOInt2ᚖint(ctx, v) - }) - if err != nil { - return nil, err - } - args["first"] = arg0 - arg1, err := graphql.ProcessArgField(ctx, rawArgs, "after", - func(ctx context.Context, v any) (*pagination.Cursor, error) { - return ec.unmarshalOCursor2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, v) - }) - if err != nil { - return nil, err - } - args["after"] = arg1 - arg2, err := graphql.ProcessArgField(ctx, rawArgs, "last", - func(ctx context.Context, v any) (*int, error) { - return ec.unmarshalOInt2ᚖint(ctx, v) - }) - if err != nil { - return nil, err - } - args["last"] = arg2 - arg3, err := graphql.ProcessArgField(ctx, rawArgs, "before", - func(ctx context.Context, v any) (*pagination.Cursor, error) { - return ec.unmarshalOCursor2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, v) - }) - if err != nil { - return nil, err - } - args["before"] = arg3 - arg4, err := graphql.ProcessArgField(ctx, rawArgs, "orderBy", - func(ctx context.Context, v any) (*postgres.PostgresBranchOrder, error) { - return ec.unmarshalOPostgresBranchOrder2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchOrder(ctx, v) - }) - if err != nil { - return nil, err - } - args["orderBy"] = arg4 - return args, nil -} - func (ec *executionContext) field_Postgres_issues_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} @@ -829,61 +657,6 @@ func (ec *executionContext) fieldContext_Postgres_resources(_ context.Context, f return fc, nil } -func (ec *executionContext) _Postgres_desiredActiveBranch(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_Postgres_desiredActiveBranch(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.DesiredActiveBranch, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) - }, - true, - false, - ) -} -func (ec *executionContext) fieldContext_Postgres_desiredActiveBranch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("Postgres", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _Postgres_activeBranch(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_Postgres_activeBranch(ctx, field) - }, - func(ctx context.Context) (any, error) { - return ec.Resolvers.Postgres().ActiveBranch(ctx, obj) - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalOPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) - }, - true, - false, - ) -} -func (ec *executionContext) fieldContext_Postgres_activeBranch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Postgres", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) - }, - } - return fc, nil -} - func (ec *executionContext) _Postgres_workloads(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -928,78 +701,66 @@ func (ec *executionContext) fieldContext_Postgres_workloads(ctx context.Context, return fc, nil } -func (ec *executionContext) _Postgres_branch(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { +func (ec *executionContext) _Postgres_labels(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_Postgres_branch(ctx, field) + return ec.fieldContext_Postgres_labels(ctx, field) }, func(ctx context.Context) (any, error) { - fc := graphql.GetFieldContext(ctx) - return ec.Resolvers.Postgres().Branch(ctx, obj, fc.Args["name"].(string)) + return obj.Labels, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []*model.ResourceLabel) graphql.Marshaler { + return ec.marshalNResourceLabel2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐResourceLabelᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_Postgres_branch(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Postgres_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Postgres", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) + return ec.childFields_ResourceLabel(ctx, field) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Postgres_branch_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Postgres_branches(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { +func (ec *executionContext) _Postgres_activityLog(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_Postgres_branches(ctx, field) + return ec.fieldContext_Postgres_activityLog(ctx, field) }, func(ctx context.Context) (any, error) { fc := graphql.GetFieldContext(ctx) - return ec.Resolvers.Postgres().Branches(ctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*pagination.Cursor), fc.Args["last"].(*int), fc.Args["before"].(*pagination.Cursor), fc.Args["orderBy"].(*postgres.PostgresBranchOrder)) + return ec.Resolvers.Postgres().ActivityLog(ctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*pagination.Cursor), fc.Args["last"].(*int), fc.Args["before"].(*pagination.Cursor), fc.Args["filter"].(*activitylog.ActivityLogFilter)) }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) graphql.Marshaler { - return ec.marshalNPostgresBranchConnection2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐFacetableConnection(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *activitylog.ActivityLogEntryConnection) graphql.Marshaler { + return ec.marshalNActivityLogEntryConnection2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryConnection(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_Postgres_branches(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Postgres_activityLog(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Postgres", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranchConnection(ctx, field) + return ec.childFields_ActivityLogEntryConnection(ctx, field) }, } defer func() { @@ -1009,126 +770,50 @@ func (ec *executionContext) fieldContext_Postgres_branches(ctx context.Context, } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Postgres_branches_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Postgres_activityLog_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Postgres_labels(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresAccess_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresAccess) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_Postgres_labels(ctx, field) + return ec.fieldContext_PostgresAccess_id(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Labels, nil + return obj.ID(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []*model.ResourceLabel) graphql.Marshaler { - return ec.marshalNResourceLabel2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐResourceLabelᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { + return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_Postgres_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Postgres", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_ResourceLabel(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresAccess_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresAccess", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _Postgres_activityLog(ctx context.Context, field graphql.CollectedField, obj *postgres.Postgres) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresAccess_name(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresAccess) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_Postgres_activityLog(ctx, field) + return ec.fieldContext_PostgresAccess_name(ctx, field) }, func(ctx context.Context) (any, error) { - fc := graphql.GetFieldContext(ctx) - return ec.Resolvers.Postgres().ActivityLog(ctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*pagination.Cursor), fc.Args["last"].(*int), fc.Args["before"].(*pagination.Cursor), fc.Args["filter"].(*activitylog.ActivityLogFilter)) + return obj.Name, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *activitylog.ActivityLogEntryConnection) graphql.Marshaler { - return ec.marshalNActivityLogEntryConnection2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryConnection(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_Postgres_activityLog(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Postgres", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_ActivityLogEntryConnection(ctx, field) - }, - } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Postgres_activityLog_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _PostgresAccess_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresAccess) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresAccess_id(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.ID(), nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresAccess_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresAccess", field, true, false, errors.New("field of type ID does not have child fields")) -} - -func (ec *executionContext) _PostgresAccess_name(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresAccess) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresAccess_name(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Name, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, @@ -1234,38 +919,6 @@ func (ec *executionContext) fieldContext_PostgresAccess_postgres(_ context.Conte return fc, nil } -func (ec *executionContext) _PostgresAccess_postgresBranch(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresAccess) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresAccess_postgresBranch(ctx, field) - }, - func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresAccess().PostgresBranch(ctx, obj) - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresAccess_postgresBranch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresAccess", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) - }, - } - return fc, nil -} - func (ec *executionContext) _PostgresAccess_accessLevel(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresAccess) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -1574,13 +1227,13 @@ func (ec *executionContext) fieldContext_PostgresAccessConnectionDetails_relayTo return graphql.NewScalarFieldContext("PostgresAccessConnectionDetails", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranch_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_id(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ID(), nil @@ -1593,20 +1246,20 @@ func (ec *executionContext) _PostgresBranch_id(ctx context.Context, field graphq true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranch", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresBranch_name(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_name(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Name, nil + return obj.Actor, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -1616,17 +1269,49 @@ func (ec *executionContext) _PostgresBranch_name(ctx context.Context, field grap true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranch", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.GitHubActorClaims, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { + return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresBranchActivatedActivityLogEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_GitHubActorClaims(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresBranch_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_createdAt(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil @@ -1639,311 +1324,233 @@ func (ec *executionContext) _PostgresBranch_createdAt(ctx context.Context, field true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranch", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresBranch_earliestRestoreTime(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_earliestRestoreTime(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranch().EarliestRestoreTime(ctx, obj) + return obj.Message, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *time.Time) graphql.Marshaler { - return ec.marshalOTime2ᚖtimeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_earliestRestoreTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranch", field, true, true, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranch_configuration(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_configuration(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Configuration, nil + return obj.ResourceType, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresConfiguration) graphql.Marshaler { - return ec.marshalOPostgresConfiguration2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresConfiguration(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { + return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_configuration(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranch", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresConfiguration(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresBranch_team(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_team(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranch().Team(ctx, obj) + return obj.ResourceName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *team.Team) graphql.Marshaler { - return ec.marshalNTeam2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋteamᚐTeam(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_team(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranch", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_Team(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranch_teamEnvironment(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_teamEnvironment(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranch().TeamEnvironment(ctx, obj) + return obj.TeamSlug, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *team.TeamEnvironment) graphql.Marshaler { - return ec.marshalNTeamEnvironment2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋteamᚐTeamEnvironment(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { + return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_teamEnvironment(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranch", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_TeamEnvironment(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresBranch_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_postgres(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranch().Postgres(ctx, obj) + return obj.EnvironmentName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { - return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresBranch_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranch", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_Postgres(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranch_workloads(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_workloads(ctx, field) + return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_data(ctx, field) }, func(ctx context.Context) (any, error) { - fc := graphql.GetFieldContext(ctx) - return ec.Resolvers.PostgresBranch().Workloads(ctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*pagination.Cursor), fc.Args["last"].(*int), fc.Args["before"].(*pagination.Cursor)) + return obj.Data, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *pagination.Connection[workload.Workload]) graphql.Marshaler { - return ec.marshalNWorkloadConnection2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐConnection(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { + return ec.marshalNPostgresBranchActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchActivityLogEntryData(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_workloads(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranch", + Object: "PostgresBranchActivatedActivityLogEntry", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_WorkloadConnection(ctx, field) + return ec.childFields_PostgresBranchActivityLogEntryData(ctx, field) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_PostgresBranch_workloads_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _PostgresBranch_state(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivityLogEntryData_branch(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_state(ctx, field) + return ec.fieldContext_PostgresBranchActivityLogEntryData_branch(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.State, nil + return obj.Branch, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v postgres.PostgresBranchState) graphql.Marshaler { - return ec.marshalNPostgresBranchState2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchState(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranch_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranch", field, false, false, errors.New("field of type PostgresBranchState does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchActivityLogEntryData_branch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranch_issues(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivityLogEntryData_sourceBranch(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_issues(ctx, field) + return ec.fieldContext_PostgresBranchActivityLogEntryData_sourceBranch(ctx, field) }, func(ctx context.Context) (any, error) { - fc := graphql.GetFieldContext(ctx) - return ec.Resolvers.PostgresBranch().Issues(ctx, obj, fc.Args["first"].(*int), fc.Args["after"].(*pagination.Cursor), fc.Args["last"].(*int), fc.Args["before"].(*pagination.Cursor), fc.Args["orderBy"].(*issue.IssueOrder), fc.Args["filter"].(*issue.ResourceIssueFilter)) + return obj.SourceBranch, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *issue.IssueConnection) graphql.Marshaler { - return ec.marshalNIssueConnection2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋissueᚐIssueConnection(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresBranch_issues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranch", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_IssueConnection(ctx, field) - }, - } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_PostgresBranch_issues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchActivityLogEntryData_sourceBranch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranch_labels(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranch) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchActivityLogEntryData_targetTime(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranch_labels(ctx, field) + return ec.fieldContext_PostgresBranchActivityLogEntryData_targetTime(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Labels, nil + return obj.TargetTime, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []*model.ResourceLabel) graphql.Marshaler { - return ec.marshalNResourceLabel2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐResourceLabelᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *time.Time) graphql.Marshaler { + return ec.marshalOTime2ᚖtimeᚐTime(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresBranch_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranch", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_ResourceLabel(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchActivityLogEntryData_targetTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchActivityLogEntryData", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ID(), nil @@ -1956,17 +1563,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_id(ctx cont true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Actor, nil @@ -1979,17 +1586,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_actor(ctx c true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { return obj.GitHubActorClaims, nil @@ -2002,9 +1609,9 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_gitHubActor false, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranchActivatedActivityLogEntry", + Object: "PostgresBranchCreatedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, @@ -2015,13 +1622,13 @@ func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry return fc, nil } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil @@ -2034,17 +1641,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_createdAt(c true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Message, nil @@ -2057,17 +1664,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_message(ctx true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceType, nil @@ -2080,17 +1687,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_resourceTyp true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceName, nil @@ -2103,17 +1710,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_resourceNam true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { return obj.TeamSlug, nil @@ -2126,17 +1733,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_teamSlug(ct true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.EnvironmentName, nil @@ -2149,17 +1756,17 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_environment false, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivatedActivityLogEntry_data(ctx, field) + return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_data(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Data, nil @@ -2172,9 +1779,9 @@ func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry_data(ctx co true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranchActivatedActivityLogEntry", + Object: "PostgresBranchCreatedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, @@ -2185,458 +1792,421 @@ func (ec *executionContext) fieldContext_PostgresBranchActivatedActivityLogEntry return fc, nil } -func (ec *executionContext) _PostgresBranchActivityLogEntryData_branch(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivityLogEntryData_branch(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Branch, nil + return obj.ID(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { + return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivityLogEntryData_branch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivityLogEntryData_sourceBranch(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivityLogEntryData_sourceBranch(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.SourceBranch, nil + return obj.Actor, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivityLogEntryData_sourceBranch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchActivityLogEntryData_targetTime(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchActivityLogEntryData_targetTime(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.TargetTime, nil + return obj.GitHubActorClaims, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *time.Time) graphql.Marshaler { - return ec.marshalOTime2ᚖtimeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { + return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) }, true, false, ) } -func (ec *executionContext) fieldContext_PostgresBranchActivityLogEntryData_targetTime(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchActivityLogEntryData", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresBranchDeletedActivityLogEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_GitHubActorClaims(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresBranchConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchConnection_pageInfo(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.PageInfo, nil + return obj.CreatedAt, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { - return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PageInfo(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresBranchConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchConnection_nodes(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Nodes(), nil + return obj.Message, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchConnection", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchConnection_edges(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Edges, nil + return obj.ResourceType, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.PostgresBranch]) graphql.Marshaler { - return ec.marshalNPostgresBranchEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { + return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranchEdge(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresBranchConnection_facets(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchConnection_facets(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresBranchConnection().Facets(ctx, obj) + return obj.ResourceName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranchFacets) graphql.Marshaler { - return ec.marshalOPostgresBranchFacets2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchFacets(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresBranchConnection_facets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchConnection", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranchFacets(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ID(), nil + return obj.TeamSlug, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { + return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Actor, nil + return obj.EnvironmentName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_data(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.GitHubActorClaims, nil + return obj.Data, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { - return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { + return ec.marshalNPostgresBranchActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchActivityLogEntryData(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranchCreatedActivityLogEntry", + Object: "PostgresBranchDeletedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_GitHubActorClaims(ctx, field) + return ec.childFields_PostgresBranchActivityLogEntryData(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresConfiguration_parameters(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresConfiguration) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresConfiguration_parameters(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.CreatedAt, nil + return obj.Parameters, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresParameter) graphql.Marshaler { + return ec.marshalNPostgresParameter2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresParameterᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) -} - -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_message(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Message, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) +func (ec *executionContext) fieldContext_PostgresConfiguration_parameters(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresConfiguration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresParameter(ctx, field) }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) + } + return fc, nil } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresConnection_pageInfo(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceType, nil + return obj.PageInfo, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { - return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { + return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PageInfo(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresConnection_nodes(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceName, nil + return obj.Nodes(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []*postgres.Postgres) graphql.Marshaler { + return ec.marshalNPostgres2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresConnection", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Postgres(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresConnection_edges(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.TeamSlug, nil + return obj.Edges, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { - return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.Postgres]) graphql.Marshaler { + return ec.marshalNPostgresEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) -} - -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_environmentName(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.EnvironmentName, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) +func (ec *executionContext) fieldContext_PostgresConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresEdge(ctx, field) }, - true, - false, - ) -} -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) + } + return fc, nil } -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresConnection_facets(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchCreatedActivityLogEntry_data(ctx, field) + return ec.fieldContext_PostgresConnection_facets(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Data, nil + return ec.Resolvers.PostgresConnection().Facets(ctx, obj) }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { - return ec.marshalNPostgresBranchActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchActivityLogEntryData(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresFacets) graphql.Marshaler { + return ec.marshalNPostgresFacets2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresFacets(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchCreatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresConnection_facets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranchCreatedActivityLogEntry", + Object: "PostgresConnection", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranchActivityLogEntryData(ctx, field) + return ec.childFields_PostgresFacets(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ID(), nil @@ -2649,17 +2219,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_id(ctx contex true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Actor, nil @@ -2672,17 +2242,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_actor(ctx con true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { return obj.GitHubActorClaims, nil @@ -2695,9 +2265,9 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_gitHubActorCl false, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranchDeletedActivityLogEntry", + Object: "PostgresCreatedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, @@ -2708,13 +2278,13 @@ func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_g return fc, nil } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil @@ -2727,17 +2297,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_createdAt(ctx true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Message, nil @@ -2750,17 +2320,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_message(ctx c true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceType, nil @@ -2773,17 +2343,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_resourceType( true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceName, nil @@ -2796,17 +2366,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_resourceName( true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { return obj.TeamSlug, nil @@ -2819,17 +2389,17 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_teamSlug(ctx true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresCreatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresCreatedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.EnvironmentName, nil @@ -2842,327 +2412,273 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_environmentNa false, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchDeletedActivityLogEntry_data(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Data, nil + return obj.ID(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { - return ec.marshalNPostgresBranchActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchActivityLogEntryData(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { + return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchDeletedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchDeletedActivityLogEntry", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranchActivityLogEntryData(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresBranchEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.PostgresBranch]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchEdge_cursor(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Cursor, nil + return obj.Actor, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { - return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.PostgresBranch]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchEdge_node(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Node, nil + return obj.GitHubActorClaims, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { + return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresBranchEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresBranchEdge", + Object: "PostgresDeletedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) + return ec.childFields_GitHubActorClaims(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresBranchFacets_environments(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchFacets) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchFacets_environments(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Environments(ctx), nil + return obj.CreatedAt, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []model.StringFacetItem) graphql.Marshaler { - return ec.marshalNStringFacetItem2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐStringFacetItemᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchFacets_environments(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchFacets", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_StringFacetItem(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresBranchFacets_states(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchFacets) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchFacets_states(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.States(ctx), nil + return obj.Message, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []postgres.PostgresBranchStateFacetItem) graphql.Marshaler { - return ec.marshalNPostgresBranchStateFacetItem2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateFacetItemᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchFacets_states(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchFacets", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranchStateFacetItem(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchFacets_labels(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchFacets) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchFacets_labels(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Labels(ctx), nil + return obj.ResourceType, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []model.LabelFacetItem) graphql.Marshaler { - return ec.marshalNLabelFacetItem2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐLabelFacetItemᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { + return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchFacets_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresBranchFacets", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_LabelFacetItem(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresBranchStateFacetItem_state(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchStateFacetItem) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchStateFacetItem_state(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.State, nil + return obj.ResourceName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v postgres.PostgresBranchState) graphql.Marshaler { - return ec.marshalNPostgresBranchState2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchState(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchStateFacetItem_state(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchStateFacetItem", field, false, false, errors.New("field of type PostgresBranchState does not have child fields")) +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresBranchStateFacetItem_count(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresBranchStateFacetItem) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresBranchStateFacetItem_count(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Count, nil + return obj.TeamSlug, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { - return ec.marshalNInt2int(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { + return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresBranchStateFacetItem_count(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresBranchStateFacetItem", field, false, false, errors.New("field of type Int does not have child fields")) +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresConfiguration_parameters(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresConfiguration) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresDeletedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresConfiguration_parameters(ctx, field) + return ec.fieldContext_PostgresDeletedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Parameters, nil + return obj.EnvironmentName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresParameter) graphql.Marshaler { - return ec.marshalNPostgresParameter2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresParameterᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresConfiguration_parameters(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresConfiguration", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresParameter(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.Postgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresConnection_pageInfo(ctx, field) + return ec.fieldContext_PostgresEdge_cursor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.PageInfo, nil + return obj.Cursor, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { - return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { + return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PageInfo(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) } -func (ec *executionContext) _PostgresConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.Postgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresConnection_nodes(ctx, field) + return ec.fieldContext_PostgresEdge_node(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Nodes(), nil + return obj.Node, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []*postgres.Postgres) graphql.Marshaler { - return ec.marshalNPostgres2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { + return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresConnection", + Object: "PostgresEdge", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return ec.childFields_Postgres(ctx, field) @@ -3171,138 +2687,106 @@ func (ec *executionContext) fieldContext_PostgresConnection_nodes(_ context.Cont return fc, nil } -func (ec *executionContext) _PostgresConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresFacets_labels(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresFacets) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresConnection_edges(ctx, field) + return ec.fieldContext_PostgresFacets_labels(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Edges, nil + return obj.Labels(ctx), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.Postgres]) graphql.Marshaler { - return ec.marshalNPostgresEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []model.LabelFacetItem) graphql.Marshaler { + return ec.marshalNLabelFacetItem2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐLabelFacetItemᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresFacets_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresConnection", + Object: "PostgresFacets", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresEdge(ctx, field) + return ec.childFields_LabelFacetItem(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresConnection_facets(ctx context.Context, field graphql.CollectedField, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresConnection_facets(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresConnection().Facets(ctx, obj) + return obj.ID(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresFacets) graphql.Marshaler { - return ec.marshalNPostgresFacets2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresFacets(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { + return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresConnection_facets(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresConnection", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresFacets(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ID(), nil + return obj.Actor, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Actor, nil + return obj.GitHubActorClaims, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { + return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresCreatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_gitHubActorClaims(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.GitHubActorClaims, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { - return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) - }, - true, - false, - ) -} -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresCreatedActivityLogEntry", + Object: "PostgresGrantAccessActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, @@ -3313,13 +2797,13 @@ func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_gitHubA return fc, nil } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil @@ -3332,17 +2816,17 @@ func (ec *executionContext) _PostgresCreatedActivityLogEntry_createdAt(ctx conte true, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Message, nil @@ -3355,17 +2839,17 @@ func (ec *executionContext) _PostgresCreatedActivityLogEntry_message(ctx context true, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceType, nil @@ -3378,17 +2862,17 @@ func (ec *executionContext) _PostgresCreatedActivityLogEntry_resourceType(ctx co true, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceName, nil @@ -3401,17 +2885,17 @@ func (ec *executionContext) _PostgresCreatedActivityLogEntry_resourceName(ctx co true, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { return obj.TeamSlug, nil @@ -3424,17 +2908,17 @@ func (ec *executionContext) _PostgresCreatedActivityLogEntry_teamSlug(ctx contex true, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresCreatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresCreatedActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.EnvironmentName, nil @@ -3447,43 +2931,52 @@ func (ec *executionContext) _PostgresCreatedActivityLogEntry_environmentName(ctx false, ) } -func (ec *executionContext) fieldContext_PostgresCreatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntry_data(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ID(), nil + return obj.Data, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresGrantAccessActivityLogEntryData) graphql.Marshaler { + return ec.marshalNPostgresGrantAccessActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresGrantAccessActivityLogEntryData(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresGrantAccessActivityLogEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresGrantAccessActivityLogEntryData(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntryData_grantee(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntryData_grantee(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Actor, nil + return obj.Grantee, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -3493,75 +2986,66 @@ func (ec *executionContext) _PostgresDeletedActivityLogEntry_actor(ctx context.C true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntryData_grantee(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresGrantAccessActivityLogEntryData_until(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresGrantAccessActivityLogEntryData_until(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.GitHubActorClaims, nil + return obj.Until, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { - return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresDeletedActivityLogEntry", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_GitHubActorClaims(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntryData_until(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntryData", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresParameter_name(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresParameter) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresParameter_name(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.CreatedAt, nil + return obj.Name, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresParameter_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresParameter", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresParameter_value(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresParameter) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresParameter_value(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Message, nil + return obj.Value, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -3571,43 +3055,43 @@ func (ec *executionContext) _PostgresDeletedActivityLogEntry_message(ctx context true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresParameter_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresParameter", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceType, nil + return obj.ID(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { - return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { + return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceName, nil + return obj.Actor, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -3617,150 +3101,187 @@ func (ec *executionContext) _PostgresDeletedActivityLogEntry_resourceName(ctx co true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.TeamSlug, nil + return obj.GitHubActorClaims, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { - return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { + return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresPersonalAccessConnectionActivityLogEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_GitHubActorClaims(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresDeletedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresDeletedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresDeletedActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.EnvironmentName, nil + return obj.CreatedAt, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresDeletedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresDeletedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.Postgres]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresEdge_cursor(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Cursor, nil + return obj.Message, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { - return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.Postgres]) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresEdge_node(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Node, nil + return obj.ResourceType, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { - return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { + return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresEdge", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_Postgres(ctx, field) - }, - } - return fc, nil -} +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +} -func (ec *executionContext) _PostgresFacets_labels(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresFacets) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresFacets_labels(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Labels(ctx), nil + return obj.ResourceName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v []model.LabelFacetItem) graphql.Marshaler { - return ec.marshalNLabelFacetItem2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐLabelFacetItemᚄ(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresFacets_labels(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresFacets", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_LabelFacetItem(ctx, field) +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_teamSlug(ctx, field) }, - } - return fc, nil + func(ctx context.Context) (any, error) { + return obj.TeamSlug, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { + return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) + }, + true, + true, + ) +} +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_environmentName(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.EnvironmentName, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +} + +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ID(), nil @@ -3773,17 +3294,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_id(ctx context. true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Actor, nil @@ -3796,17 +3317,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_actor(ctx conte true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { return obj.GitHubActorClaims, nil @@ -3819,9 +3340,9 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_gitHubActorClai false, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresGrantAccessActivityLogEntry", + Object: "PostgresPersonalAccessCreatedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, @@ -3832,13 +3353,13 @@ func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_git return fc, nil } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_createdAt(ctx, field) }, func(ctx context.Context) (any, error) { return obj.CreatedAt, nil @@ -3851,17 +3372,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_createdAt(ctx c true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Message, nil @@ -3874,17 +3395,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_message(ctx con true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceType, nil @@ -3897,17 +3418,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_resourceType(ct true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.ResourceName, nil @@ -3920,17 +3441,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_resourceName(ct true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { return obj.TeamSlug, nil @@ -3943,17 +3464,17 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_teamSlug(ctx co true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { return obj.EnvironmentName, nil @@ -3966,52 +3487,52 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_environmentName false, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntry_data(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_data(ctx, field) }, func(ctx context.Context) (any, error) { return obj.Data, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresGrantAccessActivityLogEntryData) graphql.Marshaler { - return ec.marshalNPostgresGrantAccessActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresGrantAccessActivityLogEntryData(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) graphql.Marshaler { + return ec.marshalNPostgresPersonalAccessCreatedActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresPersonalAccessCreatedActivityLogEntryData(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresGrantAccessActivityLogEntry", + Object: "PostgresPersonalAccessCreatedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresGrantAccessActivityLogEntryData(ctx, field) + return ec.childFields_PostgresPersonalAccessCreatedActivityLogEntryData(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntryData_grantee(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_username(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntryData_grantee(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_username(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Grantee, nil + return obj.Username, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -4021,66 +3542,66 @@ func (ec *executionContext) _PostgresGrantAccessActivityLogEntryData_grantee(ctx true, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntryData_grantee(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_username(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresGrantAccessActivityLogEntryData_until(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresGrantAccessActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_accessLevel(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresGrantAccessActivityLogEntryData_until(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_accessLevel(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Until, nil + return obj.AccessLevel, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresAccessLevel) graphql.Marshaler { + return ec.marshalOPostgresAccessLevel2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresAccessLevel(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresGrantAccessActivityLogEntryData_until(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresGrantAccessActivityLogEntryData", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_accessLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type PostgresAccessLevel does not have child fields")) } -func (ec *executionContext) _PostgresParameter_name(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresParameter) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_expiresAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresParameter_name(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_expiresAt(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Name, nil + return obj.ExpiresAt, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresParameter_name(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresParameter", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_expiresAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresParameter_value(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresParameter) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_reason(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresParameter_value(ctx, field) + return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_reason(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Value, nil + return obj.Reason, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -4090,121 +3611,112 @@ func (ec *executionContext) _PostgresParameter_value(ctx context.Context, field true, ) } -func (ec *executionContext) fieldContext_PostgresParameter_value(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresParameter", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresResources_cpu(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresResources) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresResources_cpu(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ID(), nil + return obj.CPU, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresResources_cpu(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresResources", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresResources_memory(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresResources) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresResources_memory(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Actor, nil + return obj.Memory, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresResources_memory(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresResources", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresResources_diskSize(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresResources) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresResources_diskSize(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.GitHubActorClaims, nil + return obj.DiskSize, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { - return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, false, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresPersonalAccessConnectionActivityLogEntry", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_GitHubActorClaims(ctx, field) - }, - } - return fc, nil +func (ec *executionContext) fieldContext_PostgresResources_diskSize(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresResources", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_id(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.CreatedAt, nil + return obj.ID(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { + return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_actor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Message, nil + return obj.Actor, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -4214,43 +3726,75 @@ func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_me true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_gitHubActorClaims(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceType, nil + return obj.GitHubActorClaims, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { - return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { + return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + }, + true, + false, + ) +} +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresUpdatedActivityLogEntry", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_GitHubActorClaims(ctx, field) + }, + } + return fc, nil +} + +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { + return graphql.ResolveField( + ctx, + ec.OperationContext, + field, + func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.fieldContext_PostgresUpdatedActivityLogEntry_createdAt(ctx, field) + }, + func(ctx context.Context) (any, error) { + return obj.CreatedAt, nil + }, + nil, + func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { + return ec.marshalNTime2timeᚐTime(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_message(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceName, nil + return obj.Message, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -4260,167 +3804,176 @@ func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_re true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_resourceType(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.TeamSlug, nil + return obj.ResourceType, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { - return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { + return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessConnectionActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessConnectionActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_resourceName(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.EnvironmentName, nil + return obj.ResourceName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { + return ec.marshalNString2string(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessConnectionActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessConnectionActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_id(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_teamSlug(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ID(), nil + return obj.TeamSlug, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { + return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_environmentName(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Actor, nil + return obj.EnvironmentName, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntry_data(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.GitHubActorClaims, nil + return obj.Data, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { - return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresUpdatedActivityLogEntryData) graphql.Marshaler { + return ec.marshalNPostgresUpdatedActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresUpdatedActivityLogEntryData(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresPersonalAccessCreatedActivityLogEntry", + Object: "PostgresUpdatedActivityLogEntry", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_GitHubActorClaims(ctx, field) + return ec.childFields_PostgresUpdatedActivityLogEntryData(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntryData_updatedFields(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryData) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntryData_updatedFields(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.CreatedAt, nil + return obj.UpdatedFields, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) graphql.Marshaler { + return ec.marshalNPostgresUpdatedActivityLogEntryDataUpdatedField2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresUpdatedActivityLogEntryDataUpdatedFieldᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryData_updatedFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresUpdatedActivityLogEntryData", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresUpdatedActivityLogEntryDataUpdatedField(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntryDataUpdatedField_field(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_message(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_field(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Message, nil + return obj.Field, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { @@ -4430,259 +3983,313 @@ func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_messa true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_field(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntryDataUpdatedField", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntryDataUpdatedField_oldValue(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceType(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_oldValue(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceType, nil + return obj.OldValue, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { - return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_oldValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntryDataUpdatedField", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresUpdatedActivityLogEntryDataUpdatedField_newValue(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceName(ctx, field) + return ec.fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_newValue(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ResourceName, nil + return obj.NewValue, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { + return ec.marshalOString2ᚖstring(ctx, selections, v) }, true, - true, + false, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_newValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntryDataUpdatedField", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkload_workload(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresWorkload) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_teamSlug(ctx, field) + return ec.fieldContext_PostgresWorkload_workload(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.TeamSlug, nil + return obj.Workload, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { - return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v workload.Workload) graphql.Marshaler { + return ec.marshalNWorkload2githubᚗcomᚋnaisᚋapiᚋinternalᚋworkloadᚐWorkload(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) +func (ec *executionContext) fieldContext_PostgresWorkload_workload(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresWorkload", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") + }, + } + return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkload_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresWorkload) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_environmentName(ctx, field) + return ec.fieldContext_PostgresWorkload_postgres(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.EnvironmentName, nil + return obj.Postgres, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { + return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresWorkload_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresWorkload", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Postgres(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkloadConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_data(ctx, field) + return ec.fieldContext_PostgresWorkloadConnection_pageInfo(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Data, nil + return obj.PageInfo, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) graphql.Marshaler { - return ec.marshalNPostgresPersonalAccessCreatedActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresPersonalAccessCreatedActivityLogEntryData(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { + return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PostgresWorkloadConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresPersonalAccessCreatedActivityLogEntry", + Object: "PostgresWorkloadConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresPersonalAccessCreatedActivityLogEntryData(ctx, field) + return ec.childFields_PageInfo(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_username(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkloadConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_username(ctx, field) + return ec.fieldContext_PostgresWorkloadConnection_nodes(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Username, nil + return obj.Nodes(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresWorkload) graphql.Marshaler { + return ec.marshalNPostgresWorkload2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresWorkloadᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_username(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresWorkloadConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresWorkloadConnection", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresWorkload(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_accessLevel(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkloadConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_accessLevel(ctx, field) + return ec.fieldContext_PostgresWorkloadConnection_edges(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.AccessLevel, nil + return obj.Edges, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresAccessLevel) graphql.Marshaler { - return ec.marshalOPostgresAccessLevel2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresAccessLevel(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.PostgresWorkload]) graphql.Marshaler { + return ec.marshalNPostgresWorkloadEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_accessLevel(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type PostgresAccessLevel does not have child fields")) +func (ec *executionContext) fieldContext_PostgresWorkloadConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresWorkloadConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresWorkloadEdge(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_expiresAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkloadEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_expiresAt(ctx, field) + return ec.fieldContext_PostgresWorkloadEdge_cursor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ExpiresAt, nil + return obj.Cursor, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { + return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_expiresAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type Time does not have child fields")) +func (ec *executionContext) fieldContext_PostgresWorkloadEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("PostgresWorkloadEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) } -func (ec *executionContext) _PostgresPersonalAccessCreatedActivityLogEntryData_reason(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresPersonalAccessCreatedActivityLogEntryData) (ret graphql.Marshaler) { +func (ec *executionContext) _PostgresWorkloadEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_reason(ctx, field) + return ec.fieldContext_PostgresWorkloadEdge_node(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Reason, nil + return obj.Node, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresWorkload) graphql.Marshaler { + return ec.marshalNPostgresWorkload2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresWorkload(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresPersonalAccessCreatedActivityLogEntryData_reason(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresPersonalAccessCreatedActivityLogEntryData", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_PostgresWorkloadEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PostgresWorkloadEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PostgresWorkload(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresResources_cpu(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresResources) (ret graphql.Marshaler) { +func (ec *executionContext) _UpdatePostgresPayload_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.UpdatePostgresPayload) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresResources_cpu(ctx, field) + return ec.fieldContext_UpdatePostgresPayload_postgres(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.CPU, nil + return obj.Postgres, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { + return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresResources_cpu(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresResources", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_UpdatePostgresPayload_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UpdatePostgresPayload", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Postgres(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresResources_memory(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresResources) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgres_envPrefix(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresResources_memory(ctx, field) + return ec.fieldContext_WorkloadPostgres_envPrefix(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Memory, nil + return obj.EnvPrefix, nil }, nil, func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { @@ -4692,940 +4299,211 @@ func (ec *executionContext) _PostgresResources_memory(ctx context.Context, field false, ) } -func (ec *executionContext) fieldContext_PostgresResources_memory(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresResources", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_WorkloadPostgres_envPrefix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("WorkloadPostgres", field, false, false, errors.New("field of type String does not have child fields")) } -func (ec *executionContext) _PostgresResources_diskSize(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresResources) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgres_role(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresResources_diskSize(ctx, field) + return ec.fieldContext_WorkloadPostgres_role(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.DiskSize, nil + return obj.Role, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v postgres.PostgresUserRole) graphql.Marshaler { + return ec.marshalNPostgresUserRole2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresUserRole(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresResources_diskSize(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresResources", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_WorkloadPostgres_role(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("WorkloadPostgres", field, false, false, errors.New("field of type PostgresUserRole does not have child fields")) } -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_id(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgres_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_id(ctx, field) + return ec.fieldContext_WorkloadPostgres_postgres(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.ID(), nil + return obj.Postgres, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v ident.Ident) graphql.Marshaler { - return ec.marshalNID2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋidentᚐIdent(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { + return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_id(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, true, false, errors.New("field of type ID does not have child fields")) +func (ec *executionContext) fieldContext_WorkloadPostgres_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "WorkloadPostgres", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_Postgres(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_actor(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgresConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_actor(ctx, field) + return ec.fieldContext_WorkloadPostgresConnection_pageInfo(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Actor, nil + return obj.PageInfo, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { + return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_actor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_WorkloadPostgresConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "WorkloadPostgresConnection", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return ec.childFields_PageInfo(ctx, field) + }, + } + return fc, nil } -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_gitHubActorClaims(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgresConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_gitHubActorClaims(ctx, field) + return ec.fieldContext_WorkloadPostgresConnection_nodes(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.GitHubActorClaims, nil + return obj.Nodes(), nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *github.GitHubActorClaims) graphql.Marshaler { - return ec.marshalOGitHubActorClaims2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋauthᚋmiddlewareᚋgithubᚐGitHubActorClaims(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []*postgres.WorkloadPostgres) graphql.Marshaler { + return ec.marshalNWorkloadPostgres2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐWorkloadPostgresᚄ(ctx, selections, v) }, true, - false, + true, ) } -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_gitHubActorClaims(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_WorkloadPostgresConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresUpdatedActivityLogEntry", + Object: "WorkloadPostgresConnection", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_GitHubActorClaims(ctx, field) + return ec.childFields_WorkloadPostgres(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_createdAt(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgresConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_createdAt(ctx, field) + return ec.fieldContext_WorkloadPostgresConnection_edges(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.CreatedAt, nil + return obj.Edges, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v time.Time) graphql.Marshaler { - return ec.marshalNTime2timeᚐTime(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.WorkloadPostgres]) graphql.Marshaler { + return ec.marshalNWorkloadPostgresEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_createdAt(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type Time does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_message(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_message(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Message, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_message(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_resourceType(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_resourceType(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.ResourceType, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v activitylog.ActivityLogEntryResourceType) graphql.Marshaler { - return ec.marshalNActivityLogEntryResourceType2githubᚗcomᚋnaisᚋapiᚋinternalᚋactivitylogᚐActivityLogEntryResourceType(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_resourceType(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type ActivityLogEntryResourceType does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_resourceName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_resourceName(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.ResourceName, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_resourceName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_teamSlug(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_teamSlug(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.TeamSlug, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *slug.Slug) graphql.Marshaler { - return ec.marshalNSlug2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_teamSlug(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type Slug does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_environmentName(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_environmentName(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.EnvironmentName, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) - }, - true, - false, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_environmentName(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntry", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntry_data(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntry) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntry_data(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Data, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresUpdatedActivityLogEntryData) graphql.Marshaler { - return ec.marshalNPostgresUpdatedActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresUpdatedActivityLogEntryData(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntry_data(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresUpdatedActivityLogEntry", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresUpdatedActivityLogEntryData(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntryData_updatedFields(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryData) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntryData_updatedFields(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.UpdatedFields, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) graphql.Marshaler { - return ec.marshalNPostgresUpdatedActivityLogEntryDataUpdatedField2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresUpdatedActivityLogEntryDataUpdatedFieldᚄ(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryData_updatedFields(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_WorkloadPostgresConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresUpdatedActivityLogEntryData", + Object: "WorkloadPostgresConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresUpdatedActivityLogEntryDataUpdatedField(ctx, field) + return ec.childFields_WorkloadPostgresEdge(ctx, field) }, } return fc, nil } -func (ec *executionContext) _PostgresUpdatedActivityLogEntryDataUpdatedField_field(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_field(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Field, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v string) graphql.Marshaler { - return ec.marshalNString2string(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_field(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntryDataUpdatedField", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntryDataUpdatedField_oldValue(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgresEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_oldValue(ctx, field) + return ec.fieldContext_WorkloadPostgresEdge_cursor(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.OldValue, nil + return obj.Cursor, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { + return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) }, true, - false, - ) -} -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_oldValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntryDataUpdatedField", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _PostgresUpdatedActivityLogEntryDataUpdatedField_newValue(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresUpdatedActivityLogEntryDataUpdatedField) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_newValue(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.NewValue, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) - }, true, - false, ) } -func (ec *executionContext) fieldContext_PostgresUpdatedActivityLogEntryDataUpdatedField_newValue(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresUpdatedActivityLogEntryDataUpdatedField", field, false, false, errors.New("field of type String does not have child fields")) +func (ec *executionContext) fieldContext_WorkloadPostgresEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + return graphql.NewScalarFieldContext("WorkloadPostgresEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) } -func (ec *executionContext) _PostgresWorkload_workload(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresWorkload) (ret graphql.Marshaler) { +func (ec *executionContext) _WorkloadPostgresEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, ec.OperationContext, field, func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkload_workload(ctx, field) + return ec.fieldContext_WorkloadPostgresEdge_node(ctx, field) }, func(ctx context.Context) (any, error) { - return obj.Workload, nil + return obj.Node, nil }, nil, - func(ctx context.Context, selections ast.SelectionSet, v workload.Workload) graphql.Marshaler { - return ec.marshalNWorkload2githubᚗcomᚋnaisᚋapiᚋinternalᚋworkloadᚐWorkload(ctx, selections, v) + func(ctx context.Context, selections ast.SelectionSet, v *postgres.WorkloadPostgres) graphql.Marshaler { + return ec.marshalNWorkloadPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐWorkloadPostgres(ctx, selections, v) }, true, true, ) } -func (ec *executionContext) fieldContext_PostgresWorkload_workload(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_WorkloadPostgresEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PostgresWorkload", + Object: "WorkloadPostgresEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresWorkload_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresWorkload) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkload_postgres(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Postgres, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { - return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkload_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresWorkload", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_Postgres(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresWorkload_branch(ctx context.Context, field graphql.CollectedField, obj *postgres.PostgresWorkload) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkload_branch(ctx, field) - }, - func(ctx context.Context) (any, error) { - return ec.Resolvers.PostgresWorkload().Branch(ctx, obj) - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkload_branch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresWorkload", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresWorkloadConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkloadConnection_pageInfo(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.PageInfo, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { - return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkloadConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresWorkloadConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PageInfo(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresWorkloadConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkloadConnection_nodes(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Nodes(), nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v []*postgres.PostgresWorkload) graphql.Marshaler { - return ec.marshalNPostgresWorkload2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresWorkloadᚄ(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkloadConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresWorkloadConnection", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresWorkload(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresWorkloadConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkloadConnection_edges(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Edges, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.PostgresWorkload]) graphql.Marshaler { - return ec.marshalNPostgresWorkloadEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkloadConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresWorkloadConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresWorkloadEdge(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _PostgresWorkloadEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkloadEdge_cursor(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Cursor, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { - return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkloadEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("PostgresWorkloadEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) -} - -func (ec *executionContext) _PostgresWorkloadEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.PostgresWorkload]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_PostgresWorkloadEdge_node(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Node, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresWorkload) graphql.Marshaler { - return ec.marshalNPostgresWorkload2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresWorkload(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_PostgresWorkloadEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "PostgresWorkloadEdge", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresWorkload(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _TeamInventoryCountPostgresBranches_total(ctx context.Context, field graphql.CollectedField, obj *postgres.TeamInventoryCountPostgresBranches) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_TeamInventoryCountPostgresBranches_total(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Total, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v int) graphql.Marshaler { - return ec.marshalNInt2int(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_TeamInventoryCountPostgresBranches_total(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("TeamInventoryCountPostgresBranches", field, false, false, errors.New("field of type Int does not have child fields")) -} - -func (ec *executionContext) _UpdatePostgresPayload_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.UpdatePostgresPayload) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_UpdatePostgresPayload_postgres(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Postgres, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { - return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_UpdatePostgresPayload_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "UpdatePostgresPayload", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_Postgres(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _WorkloadPostgres_envPrefix(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgres_envPrefix(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.EnvPrefix, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *string) graphql.Marshaler { - return ec.marshalOString2ᚖstring(ctx, selections, v) - }, - true, - false, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgres_envPrefix(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("WorkloadPostgres", field, false, false, errors.New("field of type String does not have child fields")) -} - -func (ec *executionContext) _WorkloadPostgres_role(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgres_role(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Role, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v postgres.PostgresUserRole) graphql.Marshaler { - return ec.marshalNPostgresUserRole2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresUserRole(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgres_role(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("WorkloadPostgres", field, false, false, errors.New("field of type PostgresUserRole does not have child fields")) -} - -func (ec *executionContext) _WorkloadPostgres_branch(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgres_branch(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Branch, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgres_branch(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "WorkloadPostgres", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PostgresBranch(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _WorkloadPostgres_postgres(ctx context.Context, field graphql.CollectedField, obj *postgres.WorkloadPostgres) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgres_postgres(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Postgres, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.Postgres) graphql.Marshaler { - return ec.marshalNPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgres(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgres_postgres(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "WorkloadPostgres", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_Postgres(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _WorkloadPostgresConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgresConnection_pageInfo(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.PageInfo, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.PageInfo) graphql.Marshaler { - return ec.marshalNPageInfo2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐPageInfo(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgresConnection_pageInfo(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "WorkloadPostgresConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_PageInfo(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _WorkloadPostgresConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgresConnection_nodes(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Nodes(), nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v []*postgres.WorkloadPostgres) graphql.Marshaler { - return ec.marshalNWorkloadPostgres2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐWorkloadPostgresᚄ(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgresConnection_nodes(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "WorkloadPostgresConnection", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_WorkloadPostgres(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _WorkloadPostgresConnection_edges(ctx context.Context, field graphql.CollectedField, obj *pagination.Connection[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgresConnection_edges(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Edges, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v []pagination.Edge[*postgres.WorkloadPostgres]) graphql.Marshaler { - return ec.marshalNWorkloadPostgresEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgresConnection_edges(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "WorkloadPostgresConnection", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_WorkloadPostgresEdge(ctx, field) - }, - } - return fc, nil -} - -func (ec *executionContext) _WorkloadPostgresEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgresEdge_cursor(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Cursor, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v pagination.Cursor) graphql.Marshaler { - return ec.marshalNCursor2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐCursor(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgresEdge_cursor(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - return graphql.NewScalarFieldContext("WorkloadPostgresEdge", field, false, false, errors.New("field of type Cursor does not have child fields")) -} - -func (ec *executionContext) _WorkloadPostgresEdge_node(ctx context.Context, field graphql.CollectedField, obj *pagination.Edge[*postgres.WorkloadPostgres]) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_WorkloadPostgresEdge_node(ctx, field) - }, - func(ctx context.Context) (any, error) { - return obj.Node, nil - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.WorkloadPostgres) graphql.Marshaler { - return ec.marshalNWorkloadPostgres2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐWorkloadPostgres(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_WorkloadPostgresEdge_node(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "WorkloadPostgresEdge", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_WorkloadPostgres(ctx, field) + return ec.childFields_WorkloadPostgres(ctx, field) }, } return fc, nil @@ -5646,7 +4524,7 @@ func (ec *executionContext) unmarshalInputCreatePostgresAccessInput(ctx context. asMap[k] = v } - fieldsInOrder := [...]string{"postgres", "branch", "teamSlug", "environmentName", "accessLevel", "reason", "ttl"} + fieldsInOrder := [...]string{"postgres", "teamSlug", "environmentName", "accessLevel", "reason", "ttl"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -5660,13 +4538,6 @@ func (ec *executionContext) unmarshalInputCreatePostgresAccessInput(ctx context. return it, err } it.Postgres = data - case "branch": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("branch")) - data, err := ec.unmarshalOString2string(ctx, v) - if err != nil { - return it, err - } - it.Branch = data case "teamSlug": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamSlug")) data, err := ec.unmarshalNSlug2githubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, v) @@ -5701,276 +4572,14 @@ func (ec *executionContext) unmarshalInputCreatePostgresAccessInput(ctx context. if err != nil { return it, err } - it.TTL = data - } - } - return it, nil -} - -func (ec *executionContext) unmarshalInputCreatePostgresInput(ctx context.Context, obj any) (postgres.CreatePostgresInput, error) { - var it postgres.CreatePostgresInput - if obj == nil { - return it, nil - } - - asMap := map[string]any{} - for k, v := range obj.(map[string]any) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"name", "environmentName", "teamSlug", "majorVersion", "extensions", "highAvailability", "cpu", "memory", "diskSize", "labels"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "environmentName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.EnvironmentName = data - case "teamSlug": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamSlug")) - data, err := ec.unmarshalNSlug2githubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, v) - if err != nil { - return it, err - } - it.TeamSlug = data - case "majorVersion": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("majorVersion")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.MajorVersion = data - case "extensions": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("extensions")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.Extensions = data - case "highAvailability": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("highAvailability")) - data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) - if err != nil { - return it, err - } - it.HighAvailability = data - case "cpu": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cpu")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.CPU = data - case "memory": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("memory")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.Memory = data - case "diskSize": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("diskSize")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.DiskSize = data - case "labels": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOResourceLabelInput2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐResourceLabelᚄ(ctx, v) - if err != nil { - return it, err - } - it.Labels = data - } - } - return it, nil -} - -func (ec *executionContext) unmarshalInputDeletePostgresInput(ctx context.Context, obj any) (postgres.DeletePostgresInput, error) { - var it postgres.DeletePostgresInput - if obj == nil { - return it, nil - } - - asMap := map[string]any{} - for k, v := range obj.(map[string]any) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"name", "teamSlug", "environmentName"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "teamSlug": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamSlug")) - data, err := ec.unmarshalNSlug2githubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, v) - if err != nil { - return it, err - } - it.TeamSlug = data - case "environmentName": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.EnvironmentName = data - } - } - return it, nil -} - -func (ec *executionContext) unmarshalInputPostgresBranchFilter(ctx context.Context, obj any) (postgres.PostgresBranchFilter, error) { - var it postgres.PostgresBranchFilter - if obj == nil { - return it, nil - } - - asMap := map[string]any{} - for k, v := range obj.(map[string]any) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"name", "environments", "states", "labels"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "environments": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environments")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.Environments = data - case "states": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("states")) - data, err := ec.unmarshalOPostgresBranchState2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateᚄ(ctx, v) - if err != nil { - return it, err - } - it.States = data - case "labels": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOLabelFilter2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐLabelFiltersᚄ(ctx, v) - if err != nil { - return it, err - } - it.Labels = data - } - } - return it, nil -} - -func (ec *executionContext) unmarshalInputPostgresBranchOrder(ctx context.Context, obj any) (postgres.PostgresBranchOrder, error) { - var it postgres.PostgresBranchOrder - if obj == nil { - return it, nil - } - - asMap := map[string]any{} - for k, v := range obj.(map[string]any) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"field", "direction"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "field": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNPostgresBranchOrderField2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchOrderField(ctx, v) - if err != nil { - return it, err - } - it.Field = data - case "direction": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) - data, err := ec.unmarshalNOrderDirection2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐOrderDirection(ctx, v) - if err != nil { - return it, err - } - it.Direction = data - } - } - return it, nil -} - -func (ec *executionContext) unmarshalInputTeamPostgresFilter(ctx context.Context, obj any) (postgres.TeamPostgresFilter, error) { - var it postgres.TeamPostgresFilter - if obj == nil { - return it, nil - } - - asMap := map[string]any{} - for k, v := range obj.(map[string]any) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"environments", "labels"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "environments": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environments")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.Environments = data - case "labels": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOLabelFilter2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐLabelFiltersᚄ(ctx, v) - if err != nil { - return it, err - } - it.Labels = data + it.TTL = data } } return it, nil } -func (ec *executionContext) unmarshalInputUpdatePostgresInput(ctx context.Context, obj any) (postgres.UpdatePostgresInput, error) { - var it postgres.UpdatePostgresInput +func (ec *executionContext) unmarshalInputCreatePostgresInput(ctx context.Context, obj any) (postgres.CreatePostgresInput, error) { + var it postgres.CreatePostgresInput if obj == nil { return it, nil } @@ -5980,7 +4589,7 @@ func (ec *executionContext) unmarshalInputUpdatePostgresInput(ctx context.Contex asMap[k] = v } - fieldsInOrder := [...]string{"name", "environmentName", "teamSlug", "highAvailability", "cpu", "memory", "diskSize", "extensions", "labels"} + fieldsInOrder := [...]string{"name", "environmentName", "teamSlug", "majorVersion", "extensions", "highAvailability", "cpu", "memory", "diskSize", "labels"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -6008,6 +4617,20 @@ func (ec *executionContext) unmarshalInputUpdatePostgresInput(ctx context.Contex return it, err } it.TeamSlug = data + case "majorVersion": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("majorVersion")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.MajorVersion = data + case "extensions": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("extensions")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.Extensions = data case "highAvailability": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("highAvailability")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) @@ -6036,13 +4659,6 @@ func (ec *executionContext) unmarshalInputUpdatePostgresInput(ctx context.Contex return it, err } it.DiskSize = data - case "extensions": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("extensions")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.Extensions = data case "labels": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) data, err := ec.unmarshalOResourceLabelInput2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐResourceLabelᚄ(ctx, v) @@ -6055,576 +4671,280 @@ func (ec *executionContext) unmarshalInputUpdatePostgresInput(ctx context.Contex return it, nil } -// endregion **************************** input.gotpl ***************************** - -// region ************************** interface.gotpl *************************** - -// endregion ************************** interface.gotpl *************************** - -// region **************************** object.gotpl **************************** - -var createPostgresAccessPayloadImplementors = []string{"CreatePostgresAccessPayload"} - -func (ec *executionContext) _CreatePostgresAccessPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.CreatePostgresAccessPayload) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, createPostgresAccessPayloadImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("CreatePostgresAccessPayload") - case "name": - out.Values[i] = ec._CreatePostgresAccessPayload_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "expiresAt": - out.Values[i] = ec._CreatePostgresAccessPayload_expiresAt(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - -var createPostgresPayloadImplementors = []string{"CreatePostgresPayload"} - -func (ec *executionContext) _CreatePostgresPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.CreatePostgresPayload) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, createPostgresPayloadImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("CreatePostgresPayload") - case "postgres": - out.Values[i] = ec._CreatePostgresPayload_postgres(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null +func (ec *executionContext) unmarshalInputDeletePostgresInput(ctx context.Context, obj any) (postgres.DeletePostgresInput, error) { + var it postgres.DeletePostgresInput + if obj == nil { + return it, nil } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v } - return out -} - -var deletePostgresPayloadImplementors = []string{"DeletePostgresPayload"} - -func (ec *executionContext) _DeletePostgresPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.DeletePostgresPayload) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, deletePostgresPayloadImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("DeletePostgresPayload") - case "deletionRequested": - out.Values[i] = ec._DeletePostgresPayload_deletionRequested(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - default: - panic("unknown field " + strconv.Quote(field.Name)) + fieldsInOrder := [...]string{"name", "teamSlug", "environmentName"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - -var postgresImplementors = []string{"Postgres", "Node", "ActivityLogger", "SearchNode"} - -func (ec *executionContext) _Postgres(ctx context.Context, sel ast.SelectionSet, obj *postgres.Postgres) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("Postgres") - case "id": - out.Values[i] = ec._Postgres_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "team": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_team(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "teamEnvironment": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_teamEnvironment(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + switch k { + case "name": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "name": - out.Values[i] = ec._Postgres_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + it.Name = data + case "teamSlug": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamSlug")) + data, err := ec.unmarshalNSlug2githubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, v) + if err != nil { + return it, err } - case "createdAt": - out.Values[i] = ec._Postgres_createdAt(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + it.TeamSlug = data + case "environmentName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err } - case "state": - field := field + it.EnvironmentName = data + } + } + return it, nil +} - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_state(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } +func (ec *executionContext) unmarshalInputTeamPostgresFilter(ctx context.Context, obj any) (postgres.TeamPostgresFilter, error) { + var it postgres.TeamPostgresFilter + if obj == nil { + return it, nil + } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + fieldsInOrder := [...]string{"environments", "labels"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "environments": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environments")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "configuration": - field := field - - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_configuration(ctx, field, obj) - return res + it.Environments = data + case "labels": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOLabelFilter2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐLabelFiltersᚄ(ctx, v) + if err != nil { + return it, err } + it.Labels = data + } + } + return it, nil +} - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } +func (ec *executionContext) unmarshalInputUpdatePostgresInput(ctx context.Context, obj any) (postgres.UpdatePostgresInput, error) { + var it postgres.UpdatePostgresInput + if obj == nil { + return it, nil + } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "earliestRestoreTime": - field := field + asMap := map[string]any{} + for k, v := range obj.(map[string]any) { + asMap[k] = v + } - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_earliestRestoreTime(ctx, field, obj) - return res + fieldsInOrder := [...]string{"name", "environmentName", "teamSlug", "highAvailability", "cpu", "memory", "diskSize", "extensions", "labels"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + it.Name = data + case "environmentName": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("environmentName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "issues": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_issues(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res + it.EnvironmentName = data + case "teamSlug": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("teamSlug")) + data, err := ec.unmarshalNSlug2githubᚗcomᚋnaisᚋapiᚋinternalᚋslugᚐSlug(ctx, v) + if err != nil { + return it, err } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + it.TeamSlug = data + case "highAvailability": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("highAvailability")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "majorVersion": - out.Values[i] = ec._Postgres_majorVersion(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + it.HighAvailability = data + case "cpu": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cpu")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err } - case "extensions": - out.Values[i] = ec._Postgres_extensions(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + it.CPU = data + case "memory": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("memory")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err } - case "highAvailability": - out.Values[i] = ec._Postgres_highAvailability(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + it.Memory = data + case "diskSize": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("diskSize")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.DiskSize = data + case "extensions": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("extensions")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err } - case "resources": - out.Values[i] = ec._Postgres_resources(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + it.Extensions = data + case "labels": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOResourceLabelInput2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋmodelᚐResourceLabelᚄ(ctx, v) + if err != nil { + return it, err } - case "desiredActiveBranch": - out.Values[i] = ec._Postgres_desiredActiveBranch(ctx, field, obj) - case "activeBranch": - field := field + it.Labels = data + } + } + return it, nil +} - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_activeBranch(ctx, field, obj) - return res - } +// endregion **************************** input.gotpl ***************************** - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) +// region ************************** interface.gotpl *************************** - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } +// endregion ************************** interface.gotpl *************************** - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "workloads": - field := field +// region **************************** object.gotpl **************************** - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_workloads(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } +var createPostgresAccessPayloadImplementors = []string{"CreatePostgresAccessPayload"} - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) +func (ec *executionContext) _CreatePostgresAccessPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.CreatePostgresAccessPayload) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, createPostgresAccessPayloadImplementors) - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CreatePostgresAccessPayload") + case "name": + out.Values[i] = ec._CreatePostgresAccessPayload_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "expiresAt": + out.Values[i] = ec._CreatePostgresAccessPayload_expiresAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "branch": - field := field + atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_branch(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } + for label, dfs := range deferred { + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) + return out +} - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } +var createPostgresPayloadImplementors = []string{"CreatePostgresPayload"} - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "branches": - field := field +func (ec *executionContext) _CreatePostgresPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.CreatePostgresPayload) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, createPostgresPayloadImplementors) - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_branches(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CreatePostgresPayload") + case "postgres": + out.Values[i] = ec._CreatePostgresPayload_postgres(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) + atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } + for label, dfs := range deferred { + ec.ProcessDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "labels": - out.Values[i] = ec._Postgres_labels(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "activityLog": - field := field + return out +} - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Postgres_activityLog(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } +var deletePostgresPayloadImplementors = []string{"DeletePostgresPayload"} - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) +func (ec *executionContext) _DeletePostgresPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.DeletePostgresPayload) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, deletePostgresPayloadImplementors) - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DeletePostgresPayload") + case "deletionRequested": + out.Values[i] = ec._DeletePostgresPayload_deletionRequested(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -6648,24 +4968,19 @@ func (ec *executionContext) _Postgres(ctx context.Context, sel ast.SelectionSet, return out } -var postgresAccessImplementors = []string{"PostgresAccess", "Node"} +var postgresImplementors = []string{"Postgres", "Node", "ActivityLogger", "SearchNode"} -func (ec *executionContext) _PostgresAccess(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresAccess) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresAccessImplementors) +func (ec *executionContext) _Postgres(ctx context.Context, sel ast.SelectionSet, obj *postgres.Postgres) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresAccess") + out.Values[i] = graphql.MarshalString("Postgres") case "id": - out.Values[i] = ec._PostgresAccess_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "name": - out.Values[i] = ec._PostgresAccess_name(ctx, field, obj) + out.Values[i] = ec._Postgres_id(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } @@ -6678,7 +4993,7 @@ func (ec *executionContext) _PostgresAccess(ctx context.Context, sel ast.Selecti ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresAccess_team(ctx, field, obj) + res = ec._Postgres_team(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -6714,79 +5029,7 @@ func (ec *executionContext) _PostgresAccess(ctx context.Context, sel ast.Selecti ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresAccess_teamEnvironment(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "postgres": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresAccess_postgres(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "postgresBranch": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresAccess_postgresBranch(ctx, field, obj) + res = ec._Postgres_teamEnvironment(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -6805,194 +5048,37 @@ func (ec *executionContext) _PostgresAccess(ctx context.Context, sel ast.Selecti } dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "accessLevel": - out.Values[i] = ec._PostgresAccess_accessLevel(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "expiresAt": - out.Values[i] = ec._PostgresAccess_expiresAt(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "state": - out.Values[i] = ec._PostgresAccess_state(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "message": - out.Values[i] = ec._PostgresAccess_message(ctx, field, obj) - case "relayAccess": - out.Values[i] = ec._PostgresAccess_relayAccess(ctx, field, obj) - case "connection": - field := field - - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresAccess_connection(ctx, field, obj) - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - -var postgresAccessConnectionDetailsImplementors = []string{"PostgresAccessConnectionDetails"} - -func (ec *executionContext) _PostgresAccessConnectionDetails(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresAccessConnectionDetails) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresAccessConnectionDetailsImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("PostgresAccessConnectionDetails") - case "username": - out.Values[i] = ec._PostgresAccessConnectionDetails_username(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "password": - out.Values[i] = ec._PostgresAccessConnectionDetails_password(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "caCertificate": - out.Values[i] = ec._PostgresAccessConnectionDetails_caCertificate(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "serverName": - out.Values[i] = ec._PostgresAccessConnectionDetails_serverName(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "relayEndpoint": - out.Values[i] = ec._PostgresAccessConnectionDetails_relayEndpoint(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "relayAccess": - out.Values[i] = ec._PostgresAccessConnectionDetails_relayAccess(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "relayToken": - out.Values[i] = ec._PostgresAccessConnectionDetails_relayToken(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - -var postgresBranchImplementors = []string{"PostgresBranch", "Persistence", "Node"} - -func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranch) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranch") - case "id": - out.Values[i] = ec._PostgresBranch_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "name": - out.Values[i] = ec._PostgresBranch_name(ctx, field, obj) + out.Values[i] = ec._Postgres_name(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } case "createdAt": - out.Values[i] = ec._PostgresBranch_createdAt(ctx, field, obj) + out.Values[i] = ec._Postgres_createdAt(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "earliestRestoreTime": + case "state": field := field - innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranch_earliestRestoreTime(ctx, field, obj) + res = ec._Postgres_state(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -7017,20 +5103,15 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "configuration": - out.Values[i] = ec._PostgresBranch_configuration(ctx, field, obj) - case "team": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranch_team(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Postgres_configuration(ctx, field, obj) return res } @@ -7054,19 +5135,16 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "teamEnvironment": + case "earliestRestoreTime": field := field - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { defer func() { if r := recover(); r != nil { ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranch_teamEnvironment(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Postgres_earliestRestoreTime(ctx, field, obj) return res } @@ -7090,7 +5168,7 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "postgres": + case "issues": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -7099,7 +5177,7 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranch_postgres(ctx, field, obj) + res = ec._Postgres_issues(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -7126,6 +5204,26 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "majorVersion": + out.Values[i] = ec._Postgres_majorVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "extensions": + out.Values[i] = ec._Postgres_extensions(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "highAvailability": + out.Values[i] = ec._Postgres_highAvailability(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "resources": + out.Values[i] = ec._Postgres_resources(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } case "workloads": field := field @@ -7135,7 +5233,7 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranch_workloads(ctx, field, obj) + res = ec._Postgres_workloads(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -7162,12 +5260,12 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "state": - out.Values[i] = ec._PostgresBranch_state(ctx, field, obj) + case "labels": + out.Values[i] = ec._Postgres_labels(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "issues": + case "activityLog": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -7176,7 +5274,7 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranch_issues(ctx, field, obj) + res = ec._Postgres_activityLog(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -7203,11 +5301,6 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "labels": - out.Values[i] = ec._PostgresBranch_labels(ctx, field, obj) - if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -7231,154 +5324,155 @@ func (ec *executionContext) _PostgresBranch(ctx context.Context, sel ast.Selecti return out } -var postgresBranchActivatedActivityLogEntryImplementors = []string{"PostgresBranchActivatedActivityLogEntry", "ActivityLogEntry", "Node"} +var postgresAccessImplementors = []string{"PostgresAccess", "Node"} -func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchActivatedActivityLogEntry) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchActivatedActivityLogEntryImplementors) +func (ec *executionContext) _PostgresAccess(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresAccess) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresAccessImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchActivatedActivityLogEntry") + out.Values[i] = graphql.MarshalString("PostgresAccess") case "id": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "actor": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_actor(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "gitHubActorClaims": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(ctx, field, obj) - case "createdAt": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_createdAt(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "message": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_message(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "resourceType": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_resourceType(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "resourceName": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_resourceName(ctx, field, obj) + out.Values[i] = ec._PostgresAccess_id(ctx, field, obj) if out.Values[i] == graphql.Null { - out.Invalids++ + atomic.AddUint32(&out.Invalids, 1) } - case "teamSlug": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_teamSlug(ctx, field, obj) + case "name": + out.Values[i] = ec._PostgresAccess_name(ctx, field, obj) if out.Values[i] == graphql.Null { - out.Invalids++ + atomic.AddUint32(&out.Invalids, 1) } - case "environmentName": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_environmentName(ctx, field, obj) - case "data": - out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_data(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ + case "team": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PostgresAccess_team(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } - return out -} + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "teamEnvironment": + field := field -var postgresBranchActivityLogEntryDataImplementors = []string{"PostgresBranchActivityLogEntryData"} + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PostgresAccess_teamEnvironment(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } -func (ec *executionContext) _PostgresBranchActivityLogEntryData(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchActivityLogEntryDataImplementors) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchActivityLogEntryData") - case "branch": - out.Values[i] = ec._PostgresBranchActivityLogEntryData_branch(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - case "sourceBranch": - out.Values[i] = ec._PostgresBranchActivityLogEntryData_sourceBranch(ctx, field, obj) - case "targetTime": - out.Values[i] = ec._PostgresBranchActivityLogEntryData_targetTime(ctx, field, obj) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "postgres": + field := field - return out -} + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._PostgresAccess_postgres(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } -var postgresBranchConnectionImplementors = []string{"PostgresBranchConnection"} + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) -func (ec *executionContext) _PostgresBranchConnection(ctx context.Context, sel ast.SelectionSet, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchConnectionImplementors) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchConnection") - case "pageInfo": - out.Values[i] = ec._PostgresBranchConnection_pageInfo(ctx, field, obj) + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "accessLevel": + out.Values[i] = ec._PostgresAccess_accessLevel(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "nodes": - out.Values[i] = ec._PostgresBranchConnection_nodes(ctx, field, obj) + case "expiresAt": + out.Values[i] = ec._PostgresAccess_expiresAt(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "edges": - out.Values[i] = ec._PostgresBranchConnection_edges(ctx, field, obj) + case "state": + out.Values[i] = ec._PostgresAccess_state(ctx, field, obj) if out.Values[i] == graphql.Null { atomic.AddUint32(&out.Invalids, 1) } - case "facets": + case "message": + out.Values[i] = ec._PostgresAccess_message(ctx, field, obj) + case "relayAccess": + out.Values[i] = ec._PostgresAccess_relayAccess(ctx, field, obj) + case "connection": field := field innerFunc := func(ctx context.Context, _ *graphql.FieldSet) (res graphql.Marshaler) { @@ -7387,7 +5481,7 @@ func (ec *executionContext) _PostgresBranchConnection(ctx context.Context, sel a ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._PostgresBranchConnection_facets(ctx, field, obj) + res = ec._PostgresAccess_connection(ctx, field, obj) return res } @@ -7434,58 +5528,49 @@ func (ec *executionContext) _PostgresBranchConnection(ctx context.Context, sel a return out } -var postgresBranchCreatedActivityLogEntryImplementors = []string{"PostgresBranchCreatedActivityLogEntry", "ActivityLogEntry", "Node"} +var postgresAccessConnectionDetailsImplementors = []string{"PostgresAccessConnectionDetails"} -func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchCreatedActivityLogEntry) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchCreatedActivityLogEntryImplementors) +func (ec *executionContext) _PostgresAccessConnectionDetails(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresAccessConnectionDetails) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresAccessConnectionDetailsImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchCreatedActivityLogEntry") - case "id": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_id(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "actor": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_actor(ctx, field, obj) + out.Values[i] = graphql.MarshalString("PostgresAccessConnectionDetails") + case "username": + out.Values[i] = ec._PostgresAccessConnectionDetails_username(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "gitHubActorClaims": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(ctx, field, obj) - case "createdAt": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_createdAt(ctx, field, obj) + case "password": + out.Values[i] = ec._PostgresAccessConnectionDetails_password(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "message": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_message(ctx, field, obj) + case "caCertificate": + out.Values[i] = ec._PostgresAccessConnectionDetails_caCertificate(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "resourceType": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_resourceType(ctx, field, obj) + case "serverName": + out.Values[i] = ec._PostgresAccessConnectionDetails_serverName(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "resourceName": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_resourceName(ctx, field, obj) + case "relayEndpoint": + out.Values[i] = ec._PostgresAccessConnectionDetails_relayEndpoint(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "teamSlug": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_teamSlug(ctx, field, obj) + case "relayAccess": + out.Values[i] = ec._PostgresAccessConnectionDetails_relayAccess(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "environmentName": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_environmentName(ctx, field, obj) - case "data": - out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_data(ctx, field, obj) + case "relayToken": + out.Values[i] = ec._PostgresAccessConnectionDetails_relayToken(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -7512,58 +5597,58 @@ func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry(ctx context.C return out } -var postgresBranchDeletedActivityLogEntryImplementors = []string{"PostgresBranchDeletedActivityLogEntry", "ActivityLogEntry", "Node"} +var postgresBranchActivatedActivityLogEntryImplementors = []string{"PostgresBranchActivatedActivityLogEntry", "ActivityLogEntry", "Node"} -func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchDeletedActivityLogEntry) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchDeletedActivityLogEntryImplementors) +func (ec *executionContext) _PostgresBranchActivatedActivityLogEntry(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchActivatedActivityLogEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchActivatedActivityLogEntryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchDeletedActivityLogEntry") + out.Values[i] = graphql.MarshalString("PostgresBranchActivatedActivityLogEntry") case "id": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_id(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_id(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "actor": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_actor(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_actor(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "gitHubActorClaims": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_gitHubActorClaims(ctx, field, obj) case "createdAt": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_createdAt(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_createdAt(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "message": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_message(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_message(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "resourceType": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_resourceType(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_resourceType(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "resourceName": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_resourceName(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_resourceName(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "teamSlug": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_teamSlug(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_teamSlug(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "environmentName": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_environmentName(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_environmentName(ctx, field, obj) case "data": - out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_data(ctx, field, obj) + out.Values[i] = ec._PostgresBranchActivatedActivityLogEntry_data(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -7590,27 +5675,26 @@ func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry(ctx context.C return out } -var postgresBranchEdgeImplementors = []string{"PostgresBranchEdge"} +var postgresBranchActivityLogEntryDataImplementors = []string{"PostgresBranchActivityLogEntryData"} -func (ec *executionContext) _PostgresBranchEdge(ctx context.Context, sel ast.SelectionSet, obj *pagination.Edge[*postgres.PostgresBranch]) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchEdgeImplementors) +func (ec *executionContext) _PostgresBranchActivityLogEntryData(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchActivityLogEntryDataImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchEdge") - case "cursor": - out.Values[i] = ec._PostgresBranchEdge_cursor(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "node": - out.Values[i] = ec._PostgresBranchEdge_node(ctx, field, obj) + out.Values[i] = graphql.MarshalString("PostgresBranchActivityLogEntryData") + case "branch": + out.Values[i] = ec._PostgresBranchActivityLogEntryData_branch(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "sourceBranch": + out.Values[i] = ec._PostgresBranchActivityLogEntryData_sourceBranch(ctx, field, obj) + case "targetTime": + out.Values[i] = ec._PostgresBranchActivityLogEntryData_targetTime(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -7634,125 +5718,61 @@ func (ec *executionContext) _PostgresBranchEdge(ctx context.Context, sel ast.Sel return out } -var postgresBranchFacetsImplementors = []string{"PostgresBranchFacets"} +var postgresBranchCreatedActivityLogEntryImplementors = []string{"PostgresBranchCreatedActivityLogEntry", "ActivityLogEntry", "Node"} -func (ec *executionContext) _PostgresBranchFacets(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchFacets) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchFacetsImplementors) +func (ec *executionContext) _PostgresBranchCreatedActivityLogEntry(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchCreatedActivityLogEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchCreatedActivityLogEntryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchFacets") - case "environments": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresBranchFacets_environments(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res + out.Values[i] = graphql.MarshalString("PostgresBranchCreatedActivityLogEntry") + case "id": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + case "actor": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_actor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "states": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresBranchFacets_states(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res + case "gitHubActorClaims": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_gitHubActorClaims(ctx, field, obj) + case "createdAt": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_createdAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + case "message": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_message(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "labels": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresBranchFacets_labels(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res + case "resourceType": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_resourceType(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + case "resourceName": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_resourceName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "teamSlug": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_teamSlug(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "environmentName": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_environmentName(ctx, field, obj) + case "data": + out.Values[i] = ec._PostgresBranchCreatedActivityLogEntry_data(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -7776,24 +5796,58 @@ func (ec *executionContext) _PostgresBranchFacets(ctx context.Context, sel ast.S return out } -var postgresBranchStateFacetItemImplementors = []string{"PostgresBranchStateFacetItem"} +var postgresBranchDeletedActivityLogEntryImplementors = []string{"PostgresBranchDeletedActivityLogEntry", "ActivityLogEntry", "Node"} -func (ec *executionContext) _PostgresBranchStateFacetItem(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchStateFacetItem) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchStateFacetItemImplementors) +func (ec *executionContext) _PostgresBranchDeletedActivityLogEntry(ctx context.Context, sel ast.SelectionSet, obj *postgres.PostgresBranchDeletedActivityLogEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, postgresBranchDeletedActivityLogEntryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PostgresBranchStateFacetItem") - case "state": - out.Values[i] = ec._PostgresBranchStateFacetItem_state(ctx, field, obj) + out.Values[i] = graphql.MarshalString("PostgresBranchDeletedActivityLogEntry") + case "id": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "actor": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_actor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "gitHubActorClaims": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_gitHubActorClaims(ctx, field, obj) + case "createdAt": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_createdAt(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "message": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_message(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "resourceType": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_resourceType(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "resourceName": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_resourceName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "teamSlug": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_teamSlug(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "count": - out.Values[i] = ec._PostgresBranchStateFacetItem_count(ctx, field, obj) + case "environmentName": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_environmentName(ctx, field, obj) + case "data": + out.Values[i] = ec._PostgresBranchDeletedActivityLogEntry_data(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -8786,49 +6840,13 @@ func (ec *executionContext) _PostgresWorkload(ctx context.Context, sel ast.Selec case "workload": out.Values[i] = ec._PostgresWorkload_workload(ctx, field, obj) if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) + out.Invalids++ } case "postgres": out.Values[i] = ec._PostgresWorkload_postgres(ctx, field, obj) if out.Values[i] == graphql.Null { - atomic.AddUint32(&out.Invalids, 1) - } - case "branch": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._PostgresWorkload_branch(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + out.Invalids++ } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -8945,45 +6963,6 @@ func (ec *executionContext) _PostgresWorkloadEdge(ctx context.Context, sel ast.S return out } -var teamInventoryCountPostgresBranchesImplementors = []string{"TeamInventoryCountPostgresBranches"} - -func (ec *executionContext) _TeamInventoryCountPostgresBranches(ctx context.Context, sel ast.SelectionSet, obj *postgres.TeamInventoryCountPostgresBranches) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, teamInventoryCountPostgresBranchesImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("TeamInventoryCountPostgresBranches") - case "total": - out.Values[i] = ec._TeamInventoryCountPostgresBranches_total(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32))) - - for label, dfs := range deferred { - ec.ProcessDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - var updatePostgresPayloadImplementors = []string{"UpdatePostgresPayload"} func (ec *executionContext) _UpdatePostgresPayload(ctx context.Context, sel ast.SelectionSet, obj *postgres.UpdatePostgresPayload) graphql.Marshaler { @@ -9041,11 +7020,6 @@ func (ec *executionContext) _WorkloadPostgres(ctx context.Context, sel ast.Selec if out.Values[i] == graphql.Null { out.Invalids++ } - case "branch": - out.Values[i] = ec._WorkloadPostgres_branch(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } case "postgres": out.Values[i] = ec._WorkloadPostgres_postgres(ctx, field, obj) if out.Values[i] == graphql.Null { @@ -9292,36 +7266,6 @@ func (ec *executionContext) marshalNPostgresAccessState2githubᚗcomᚋnaisᚋap return v } -func (ec *executionContext) marshalNPostgresBranch2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx context.Context, sel ast.SelectionSet, v postgres.PostgresBranch) graphql.Marshaler { - return ec._PostgresBranch(ctx, sel, &v) -} - -func (ec *executionContext) marshalNPostgresBranch2ᚕᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchᚄ(ctx context.Context, sel ast.SelectionSet, v []*postgres.PostgresBranch) graphql.Marshaler { - ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { - fc := graphql.GetFieldContext(ctx) - fc.Result = &v[i] - return ec.marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx, sel, v[i]) - }) - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - - return ret -} - -func (ec *executionContext) marshalNPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx context.Context, sel ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._PostgresBranch(ctx, sel, v) -} - func (ec *executionContext) marshalNPostgresBranchActivityLogEntryData2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchActivityLogEntryData(ctx context.Context, sel ast.SelectionSet, v *postgres.PostgresBranchActivityLogEntryData) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { @@ -9332,80 +7276,6 @@ func (ec *executionContext) marshalNPostgresBranchActivityLogEntryData2ᚖgithub return ec._PostgresBranchActivityLogEntryData(ctx, sel, v) } -func (ec *executionContext) marshalNPostgresBranchConnection2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐFacetableConnection(ctx context.Context, sel ast.SelectionSet, v pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) graphql.Marshaler { - return ec._PostgresBranchConnection(ctx, sel, &v) -} - -func (ec *executionContext) marshalNPostgresBranchConnection2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐFacetableConnection(ctx context.Context, sel ast.SelectionSet, v *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._PostgresBranchConnection(ctx, sel, v) -} - -func (ec *executionContext) marshalNPostgresBranchEdge2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdge(ctx context.Context, sel ast.SelectionSet, v pagination.Edge[*postgres.PostgresBranch]) graphql.Marshaler { - return ec._PostgresBranchEdge(ctx, sel, &v) -} - -func (ec *executionContext) marshalNPostgresBranchEdge2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []pagination.Edge[*postgres.PostgresBranch]) graphql.Marshaler { - ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { - fc := graphql.GetFieldContext(ctx) - fc.Result = &v[i] - return ec.marshalNPostgresBranchEdge2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐEdge(ctx, sel, v[i]) - }) - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - - return ret -} - -func (ec *executionContext) unmarshalNPostgresBranchOrderField2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchOrderField(ctx context.Context, v any) (postgres.PostgresBranchOrderField, error) { - var res postgres.PostgresBranchOrderField - err := res.UnmarshalGQL(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNPostgresBranchOrderField2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchOrderField(ctx context.Context, sel ast.SelectionSet, v postgres.PostgresBranchOrderField) graphql.Marshaler { - return v -} - -func (ec *executionContext) unmarshalNPostgresBranchState2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchState(ctx context.Context, v any) (postgres.PostgresBranchState, error) { - var res postgres.PostgresBranchState - err := res.UnmarshalGQL(v) - return res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) marshalNPostgresBranchState2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchState(ctx context.Context, sel ast.SelectionSet, v postgres.PostgresBranchState) graphql.Marshaler { - return v -} - -func (ec *executionContext) marshalNPostgresBranchStateFacetItem2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateFacetItem(ctx context.Context, sel ast.SelectionSet, v postgres.PostgresBranchStateFacetItem) graphql.Marshaler { - return ec._PostgresBranchStateFacetItem(ctx, sel, &v) -} - -func (ec *executionContext) marshalNPostgresBranchStateFacetItem2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateFacetItemᚄ(ctx context.Context, sel ast.SelectionSet, v []postgres.PostgresBranchStateFacetItem) graphql.Marshaler { - ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { - fc := graphql.GetFieldContext(ctx) - fc.Result = &v[i] - return ec.marshalNPostgresBranchStateFacetItem2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateFacetItem(ctx, sel, v[i]) - }) - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - - return ret -} - func (ec *executionContext) marshalNPostgresConnection2githubᚗcomᚋnaisᚋapiᚋinternalᚋgraphᚋpaginationᚐFacetableConnection(ctx context.Context, sel ast.SelectionSet, v pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) graphql.Marshaler { return ec._PostgresConnection(ctx, sel, &v) } @@ -9627,20 +7497,6 @@ func (ec *executionContext) marshalNPostgresWorkloadEdge2ᚕgithubᚗcomᚋnais return ret } -func (ec *executionContext) marshalNTeamInventoryCountPostgresBranches2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐTeamInventoryCountPostgresBranches(ctx context.Context, sel ast.SelectionSet, v postgres.TeamInventoryCountPostgresBranches) graphql.Marshaler { - return ec._TeamInventoryCountPostgresBranches(ctx, sel, &v) -} - -func (ec *executionContext) marshalNTeamInventoryCountPostgresBranches2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐTeamInventoryCountPostgresBranches(ctx context.Context, sel ast.SelectionSet, v *postgres.TeamInventoryCountPostgresBranches) graphql.Marshaler { - if v == nil { - if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { - graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") - } - return graphql.Null - } - return ec._TeamInventoryCountPostgresBranches(ctx, sel, v) -} - func (ec *executionContext) unmarshalNUpdatePostgresInput2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐUpdatePostgresInput(ctx context.Context, v any) (postgres.UpdatePostgresInput, error) { res, err := ec.unmarshalInputUpdatePostgresInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) @@ -9743,65 +7599,6 @@ func (ec *executionContext) marshalOPostgresAccessLevel2ᚖgithubᚗcomᚋnais return v } -func (ec *executionContext) marshalOPostgresBranch2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranch(ctx context.Context, sel ast.SelectionSet, v *postgres.PostgresBranch) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._PostgresBranch(ctx, sel, v) -} - -func (ec *executionContext) marshalOPostgresBranchFacets2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchFacets(ctx context.Context, sel ast.SelectionSet, v *postgres.PostgresBranchFacets) graphql.Marshaler { - if v == nil { - return graphql.Null - } - return ec._PostgresBranchFacets(ctx, sel, v) -} - -func (ec *executionContext) unmarshalOPostgresBranchOrder2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchOrder(ctx context.Context, v any) (*postgres.PostgresBranchOrder, error) { - if v == nil { - return nil, nil - } - res, err := ec.unmarshalInputPostgresBranchOrder(ctx, v) - return &res, graphql.ErrorOnPath(ctx, err) -} - -func (ec *executionContext) unmarshalOPostgresBranchState2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateᚄ(ctx context.Context, v any) ([]postgres.PostgresBranchState, error) { - if v == nil { - return nil, nil - } - var vSlice []any - vSlice = graphql.CoerceList(v) - var err error - res := make([]postgres.PostgresBranchState, len(vSlice)) - for i := range vSlice { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) - res[i], err = ec.unmarshalNPostgresBranchState2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchState(ctx, vSlice[i]) - if err != nil { - return nil, err - } - } - return res, nil -} - -func (ec *executionContext) marshalOPostgresBranchState2ᚕgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchStateᚄ(ctx context.Context, sel ast.SelectionSet, v []postgres.PostgresBranchState) graphql.Marshaler { - if v == nil { - return graphql.Null - } - ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler { - fc := graphql.GetFieldContext(ctx) - fc.Result = &v[i] - return ec.marshalNPostgresBranchState2githubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresBranchState(ctx, sel, v[i]) - }) - - for _, e := range ret { - if e == graphql.Null { - return graphql.Null - } - } - - return ret -} - func (ec *executionContext) marshalOPostgresConfiguration2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐPostgresConfiguration(ctx context.Context, sel ast.SelectionSet, v *postgres.PostgresConfiguration) graphql.Marshaler { if v == nil { return graphql.Null diff --git a/internal/graph/gengql/root_.generated.go b/internal/graph/gengql/root_.generated.go index 7a2a9ad65..94148b3ab 100644 --- a/internal/graph/gengql/root_.generated.go +++ b/internal/graph/gengql/root_.generated.go @@ -110,12 +110,8 @@ type ResolverRoot interface { OpenSearchMaintenance() OpenSearchMaintenanceResolver Postgres() PostgresResolver PostgresAccess() PostgresAccessResolver - PostgresBranch() PostgresBranchResolver - PostgresBranchConnection() PostgresBranchConnectionResolver - PostgresBranchIssue() PostgresBranchIssueResolver PostgresConnection() PostgresConnectionResolver PostgresIssue() PostgresIssueResolver - PostgresWorkload() PostgresWorkloadResolver PrometheusAlert() PrometheusAlertResolver Query() QueryResolver Reconciler() ReconcilerResolver @@ -1939,13 +1935,9 @@ type ComplexityRoot struct { } Postgres struct { - ActiveBranch func(childComplexity int) int ActivityLog func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, filter *activitylog.ActivityLogFilter) int - Branch func(childComplexity int, name string) int - Branches func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *postgres.PostgresBranchOrder) int Configuration func(childComplexity int) int CreatedAt func(childComplexity int) int - DesiredActiveBranch func(childComplexity int) int EarliestRestoreTime func(childComplexity int) int Extensions func(childComplexity int) int HighAvailability func(childComplexity int) int @@ -1969,7 +1961,6 @@ type ComplexityRoot struct { Message func(childComplexity int) int Name func(childComplexity int) int Postgres func(childComplexity int) int - PostgresBranch func(childComplexity int) int RelayAccess func(childComplexity int) int State func(childComplexity int) int Team func(childComplexity int) int @@ -1986,21 +1977,6 @@ type ComplexityRoot struct { Username func(childComplexity int) int } - PostgresBranch struct { - Configuration func(childComplexity int) int - CreatedAt func(childComplexity int) int - EarliestRestoreTime func(childComplexity int) int - ID func(childComplexity int) int - Issues func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *issue.IssueOrder, filter *issue.ResourceIssueFilter) int - Labels func(childComplexity int) int - Name func(childComplexity int) int - Postgres func(childComplexity int) int - State func(childComplexity int) int - Team func(childComplexity int) int - TeamEnvironment func(childComplexity int) int - Workloads func(childComplexity int, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) int - } - PostgresBranchActivatedActivityLogEntry struct { Actor func(childComplexity int) int CreatedAt func(childComplexity int) int @@ -2020,13 +1996,6 @@ type ComplexityRoot struct { TargetTime func(childComplexity int) int } - PostgresBranchConnection struct { - Edges func(childComplexity int) int - Facets func(childComplexity int) int - Nodes func(childComplexity int) int - PageInfo func(childComplexity int) int - } - PostgresBranchCreatedActivityLogEntry struct { Actor func(childComplexity int) int CreatedAt func(childComplexity int) int @@ -2053,30 +2022,6 @@ type ComplexityRoot struct { TeamSlug func(childComplexity int) int } - PostgresBranchEdge struct { - Cursor func(childComplexity int) int - Node func(childComplexity int) int - } - - PostgresBranchFacets struct { - Environments func(childComplexity int) int - Labels func(childComplexity int) int - States func(childComplexity int) int - } - - PostgresBranchIssue struct { - Branch func(childComplexity int) int - ID func(childComplexity int) int - Message func(childComplexity int) int - Severity func(childComplexity int) int - TeamEnvironment func(childComplexity int) int - } - - PostgresBranchStateFacetItem struct { - Count func(childComplexity int) int - State func(childComplexity int) int - } - PostgresConfiguration struct { Parameters func(childComplexity int) int } @@ -2214,7 +2159,6 @@ type ComplexityRoot struct { } PostgresWorkload struct { - Branch func(childComplexity int) int Postgres func(childComplexity int) int Workload func(childComplexity int) int } @@ -3361,10 +3305,6 @@ type ComplexityRoot struct { Total func(childComplexity int) int } - TeamInventoryCountPostgresBranches struct { - Total func(childComplexity int) int - } - TeamInventoryCountSecrets struct { Total func(childComplexity int) int } @@ -3385,7 +3325,6 @@ type ComplexityRoot struct { Jobs func(childComplexity int) int KafkaTopics func(childComplexity int) int OpenSearches func(childComplexity int) int - PostgresBranches func(childComplexity int) int SQLInstances func(childComplexity int) int Secrets func(childComplexity int) int Valkeys func(childComplexity int) int @@ -4265,7 +4204,6 @@ type ComplexityRoot struct { } WorkloadPostgres struct { - Branch func(childComplexity int) int EnvPrefix func(childComplexity int) int Postgres func(childComplexity int) int Role func(childComplexity int) int @@ -12227,13 +12165,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.PageInfo.TotalCount(childComplexity), true - case "Postgres.activeBranch": - if e.ComplexityRoot.Postgres.ActiveBranch == nil { - break - } - - return e.ComplexityRoot.Postgres.ActiveBranch(childComplexity), true - case "Postgres.activityLog": if e.ComplexityRoot.Postgres.ActivityLog == nil { break @@ -12246,30 +12177,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.Postgres.ActivityLog(childComplexity, args["first"].(*int), args["after"].(*pagination.Cursor), args["last"].(*int), args["before"].(*pagination.Cursor), args["filter"].(*activitylog.ActivityLogFilter)), true - case "Postgres.branch": - if e.ComplexityRoot.Postgres.Branch == nil { - break - } - - args, err := ec.field_Postgres_branch_args(ctx, rawArgs) - if err != nil { - return 0, false - } - - return e.ComplexityRoot.Postgres.Branch(childComplexity, args["name"].(string)), true - - case "Postgres.branches": - if e.ComplexityRoot.Postgres.Branches == nil { - break - } - - args, err := ec.field_Postgres_branches_args(ctx, rawArgs) - if err != nil { - return 0, false - } - - return e.ComplexityRoot.Postgres.Branches(childComplexity, args["first"].(*int), args["after"].(*pagination.Cursor), args["last"].(*int), args["before"].(*pagination.Cursor), args["orderBy"].(*postgres.PostgresBranchOrder)), true - case "Postgres.configuration": if e.ComplexityRoot.Postgres.Configuration == nil { break @@ -12284,13 +12191,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.Postgres.CreatedAt(childComplexity), true - case "Postgres.desiredActiveBranch": - if e.ComplexityRoot.Postgres.DesiredActiveBranch == nil { - break - } - - return e.ComplexityRoot.Postgres.DesiredActiveBranch(childComplexity), true - case "Postgres.earliestRestoreTime": if e.ComplexityRoot.Postgres.EarliestRestoreTime == nil { break @@ -12441,13 +12341,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.PostgresAccess.Postgres(childComplexity), true - case "PostgresAccess.postgresBranch": - if e.ComplexityRoot.PostgresAccess.PostgresBranch == nil { - break - } - - return e.ComplexityRoot.PostgresAccess.PostgresBranch(childComplexity), true - case "PostgresAccess.relayAccess": if e.ComplexityRoot.PostgresAccess.RelayAccess == nil { break @@ -12525,100 +12418,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.PostgresAccessConnectionDetails.Username(childComplexity), true - case "PostgresBranch.configuration": - if e.ComplexityRoot.PostgresBranch.Configuration == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.Configuration(childComplexity), true - - case "PostgresBranch.createdAt": - if e.ComplexityRoot.PostgresBranch.CreatedAt == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.CreatedAt(childComplexity), true - - case "PostgresBranch.earliestRestoreTime": - if e.ComplexityRoot.PostgresBranch.EarliestRestoreTime == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.EarliestRestoreTime(childComplexity), true - - case "PostgresBranch.id": - if e.ComplexityRoot.PostgresBranch.ID == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.ID(childComplexity), true - - case "PostgresBranch.issues": - if e.ComplexityRoot.PostgresBranch.Issues == nil { - break - } - - args, err := ec.field_PostgresBranch_issues_args(ctx, rawArgs) - if err != nil { - return 0, false - } - - return e.ComplexityRoot.PostgresBranch.Issues(childComplexity, args["first"].(*int), args["after"].(*pagination.Cursor), args["last"].(*int), args["before"].(*pagination.Cursor), args["orderBy"].(*issue.IssueOrder), args["filter"].(*issue.ResourceIssueFilter)), true - - case "PostgresBranch.labels": - if e.ComplexityRoot.PostgresBranch.Labels == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.Labels(childComplexity), true - - case "PostgresBranch.name": - if e.ComplexityRoot.PostgresBranch.Name == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.Name(childComplexity), true - - case "PostgresBranch.postgres": - if e.ComplexityRoot.PostgresBranch.Postgres == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.Postgres(childComplexity), true - - case "PostgresBranch.state": - if e.ComplexityRoot.PostgresBranch.State == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.State(childComplexity), true - - case "PostgresBranch.team": - if e.ComplexityRoot.PostgresBranch.Team == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.Team(childComplexity), true - - case "PostgresBranch.teamEnvironment": - if e.ComplexityRoot.PostgresBranch.TeamEnvironment == nil { - break - } - - return e.ComplexityRoot.PostgresBranch.TeamEnvironment(childComplexity), true - - case "PostgresBranch.workloads": - if e.ComplexityRoot.PostgresBranch.Workloads == nil { - break - } - - args, err := ec.field_PostgresBranch_workloads_args(ctx, rawArgs) - if err != nil { - return 0, false - } - - return e.ComplexityRoot.PostgresBranch.Workloads(childComplexity, args["first"].(*int), args["after"].(*pagination.Cursor), args["last"].(*int), args["before"].(*pagination.Cursor)), true - case "PostgresBranchActivatedActivityLogEntry.actor": if e.ComplexityRoot.PostgresBranchActivatedActivityLogEntry.Actor == nil { break @@ -12710,34 +12509,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.PostgresBranchActivityLogEntryData.TargetTime(childComplexity), true - case "PostgresBranchConnection.edges": - if e.ComplexityRoot.PostgresBranchConnection.Edges == nil { - break - } - - return e.ComplexityRoot.PostgresBranchConnection.Edges(childComplexity), true - - case "PostgresBranchConnection.facets": - if e.ComplexityRoot.PostgresBranchConnection.Facets == nil { - break - } - - return e.ComplexityRoot.PostgresBranchConnection.Facets(childComplexity), true - - case "PostgresBranchConnection.nodes": - if e.ComplexityRoot.PostgresBranchConnection.Nodes == nil { - break - } - - return e.ComplexityRoot.PostgresBranchConnection.Nodes(childComplexity), true - - case "PostgresBranchConnection.pageInfo": - if e.ComplexityRoot.PostgresBranchConnection.PageInfo == nil { - break - } - - return e.ComplexityRoot.PostgresBranchConnection.PageInfo(childComplexity), true - case "PostgresBranchCreatedActivityLogEntry.actor": if e.ComplexityRoot.PostgresBranchCreatedActivityLogEntry.Actor == nil { break @@ -12878,90 +12649,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.PostgresBranchDeletedActivityLogEntry.TeamSlug(childComplexity), true - case "PostgresBranchEdge.cursor": - if e.ComplexityRoot.PostgresBranchEdge.Cursor == nil { - break - } - - return e.ComplexityRoot.PostgresBranchEdge.Cursor(childComplexity), true - - case "PostgresBranchEdge.node": - if e.ComplexityRoot.PostgresBranchEdge.Node == nil { - break - } - - return e.ComplexityRoot.PostgresBranchEdge.Node(childComplexity), true - - case "PostgresBranchFacets.environments": - if e.ComplexityRoot.PostgresBranchFacets.Environments == nil { - break - } - - return e.ComplexityRoot.PostgresBranchFacets.Environments(childComplexity), true - - case "PostgresBranchFacets.labels": - if e.ComplexityRoot.PostgresBranchFacets.Labels == nil { - break - } - - return e.ComplexityRoot.PostgresBranchFacets.Labels(childComplexity), true - - case "PostgresBranchFacets.states": - if e.ComplexityRoot.PostgresBranchFacets.States == nil { - break - } - - return e.ComplexityRoot.PostgresBranchFacets.States(childComplexity), true - - case "PostgresBranchIssue.branch": - if e.ComplexityRoot.PostgresBranchIssue.Branch == nil { - break - } - - return e.ComplexityRoot.PostgresBranchIssue.Branch(childComplexity), true - - case "PostgresBranchIssue.id": - if e.ComplexityRoot.PostgresBranchIssue.ID == nil { - break - } - - return e.ComplexityRoot.PostgresBranchIssue.ID(childComplexity), true - - case "PostgresBranchIssue.message": - if e.ComplexityRoot.PostgresBranchIssue.Message == nil { - break - } - - return e.ComplexityRoot.PostgresBranchIssue.Message(childComplexity), true - - case "PostgresBranchIssue.severity": - if e.ComplexityRoot.PostgresBranchIssue.Severity == nil { - break - } - - return e.ComplexityRoot.PostgresBranchIssue.Severity(childComplexity), true - - case "PostgresBranchIssue.teamEnvironment": - if e.ComplexityRoot.PostgresBranchIssue.TeamEnvironment == nil { - break - } - - return e.ComplexityRoot.PostgresBranchIssue.TeamEnvironment(childComplexity), true - - case "PostgresBranchStateFacetItem.count": - if e.ComplexityRoot.PostgresBranchStateFacetItem.Count == nil { - break - } - - return e.ComplexityRoot.PostgresBranchStateFacetItem.Count(childComplexity), true - - case "PostgresBranchStateFacetItem.state": - if e.ComplexityRoot.PostgresBranchStateFacetItem.State == nil { - break - } - - return e.ComplexityRoot.PostgresBranchStateFacetItem.State(childComplexity), true - case "PostgresConfiguration.parameters": if e.ComplexityRoot.PostgresConfiguration.Parameters == nil { break @@ -13557,13 +13244,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.PostgresUpdatedActivityLogEntryDataUpdatedField.OldValue(childComplexity), true - case "PostgresWorkload.branch": - if e.ComplexityRoot.PostgresWorkload.Branch == nil { - break - } - - return e.ComplexityRoot.PostgresWorkload.Branch(childComplexity), true - case "PostgresWorkload.postgres": if e.ComplexityRoot.PostgresWorkload.Postgres == nil { break @@ -18931,13 +18611,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.TeamInventoryCountOpenSearches.Total(childComplexity), true - case "TeamInventoryCountPostgresBranches.total": - if e.ComplexityRoot.TeamInventoryCountPostgresBranches.Total == nil { - break - } - - return e.ComplexityRoot.TeamInventoryCountPostgresBranches.Total(childComplexity), true - case "TeamInventoryCountSecrets.total": if e.ComplexityRoot.TeamInventoryCountSecrets.Total == nil { break @@ -19008,13 +18681,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.TeamInventoryCounts.OpenSearches(childComplexity), true - case "TeamInventoryCounts.postgresBranches": - if e.ComplexityRoot.TeamInventoryCounts.PostgresBranches == nil { - break - } - - return e.ComplexityRoot.TeamInventoryCounts.PostgresBranches(childComplexity), true - case "TeamInventoryCounts.sqlInstances": if e.ComplexityRoot.TeamInventoryCounts.SQLInstances == nil { break @@ -22693,13 +22359,6 @@ func (e *executableSchema) Complexity(ctx context.Context, typeName, field strin return e.ComplexityRoot.WorkloadLogLine.Time(childComplexity), true - case "WorkloadPostgres.branch": - if e.ComplexityRoot.WorkloadPostgres.Branch == nil { - break - } - - return e.ComplexityRoot.WorkloadPostgres.Branch(childComplexity), true - case "WorkloadPostgres.envPrefix": if e.ComplexityRoot.WorkloadPostgres.EnvPrefix == nil { break @@ -23193,8 +22852,6 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { ec.unmarshalInputOpenSearchAccessOrder, ec.unmarshalInputOpenSearchFilter, ec.unmarshalInputOpenSearchOrder, - ec.unmarshalInputPostgresBranchFilter, - ec.unmarshalInputPostgresBranchOrder, ec.unmarshalInputReconcilerConfigInput, ec.unmarshalInputRemoveConfigValueInput, ec.unmarshalInputRemoveRepositoryFromTeamInput, @@ -27543,8 +27200,6 @@ enum Severity { enum ResourceType { "Postgres database." POSTGRES - "A branch of a Postgres database." - POSTGRES_BRANCH @deprecated(reason: "Use POSTGRES instead.") OPENSEARCH VALKEY SQLINSTANCE @@ -27556,8 +27211,6 @@ enum ResourceType { enum IssueType { "Postgres database failure." POSTGRES - "Raised when a Postgres branch has reported a failure." - POSTGRES_BRANCH @deprecated(reason: "Use POSTGRES instead.") OPENSEARCH VALKEY SQLINSTANCE_STATE @@ -27702,20 +27355,6 @@ type PostgresIssue implements Issue & Node { postgres: Postgres! } -"Legacy issue type, no longer returned. Use PostgresIssue instead." -type PostgresBranchIssue implements Issue & Node { - "Unique identifier for this issue." - id: ID! - "Team environment containing the affected branch." - teamEnvironment: TeamEnvironment! - "Severity of the reported failure." - severity: Severity! - "Description of the reported failure." - message: String! - "The branch that reported the failure." - branch: PostgresBranch! @deprecated(reason: "Use PostgresIssue.postgres instead.") -} - type SqlInstanceVersionIssue implements Issue & Node { id: ID! teamEnvironment: TeamEnvironment! @@ -29856,7 +29495,7 @@ type WorkloadLogLine { } extend type Team { - "Postgres databases owned by the team, including those without branches." + "Postgres databases owned by the team." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -29885,7 +29524,7 @@ extend type TeamEnvironment { } extend interface Workload { - "Postgres references configured in uses.postgres, including their resolved branch." + "Postgres references configured in uses.postgres." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -29899,7 +29538,7 @@ extend interface Workload { } extend type Application { - "Postgres references configured in uses.postgres, including their resolved branch." + "Postgres references configured in uses.postgres." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -29913,7 +29552,7 @@ extend type Application { } extend type Job { - "Postgres references configured in uses.postgres, including their resolved branch." + "Postgres references configured in uses.postgres." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -29934,84 +29573,7 @@ input TeamPostgresFilter { labels: [LabelFilter!] } -input PostgresBranchOrder { - field: PostgresBranchOrderField! - direction: OrderDirection! -} - -""" -Input for filtering Postgres branches. -""" -input PostgresBranchFilter { - "Filter by the name of the branch." - name: String - - "Filter by environments." - environments: [String!] - - "Filter by branch state." - states: [PostgresBranchState!] - - "Filter by user-defined labels. All listed labels must match." - labels: [LabelFilter!] -} - -enum PostgresBranchOrderField { - NAME - ENVIRONMENT -} - -"A named PostgresBranch belonging to a Postgres." -type PostgresBranch implements Persistence & Node { - id: ID! - "Local name of this branch within its Postgres." - name: String! - "Time when this branch was created." - createdAt: Time! - "Earliest time the branch can currently be restored from its archived backups." - earliestRestoreTime: Time - "Configured PostgreSQL settings for this branch. Null until configuration is available." - configuration: PostgresConfiguration - team: Team! - teamEnvironment: TeamEnvironment! - "Postgres owning this PostgresBranch." - postgres: Postgres! - "Workloads explicitly using this branch, or following it while it is active." - workloads( - "Get the first n items in the connection. This can be used in combination with the after parameter." - first: Int - - "Get items after this cursor." - after: Cursor - - "Get the last n items in the connection. This can be used in combination with the before parameter." - last: Int - - "Get items before this cursor." - before: Cursor - ): WorkloadConnection! - "Current observed state of the branch." - state: PostgresBranchState! - "Issues affecting this branch." - issues( - "Get the first n items in the connection." - first: Int - "Get items after this cursor." - after: Cursor - "Get the last n items in the connection." - last: Int - "Get items before this cursor." - before: Cursor - "Ordering options for the issues." - orderBy: IssueOrder - "Filtering options for the issues." - filter: ResourceIssueFilter - ): IssueConnection! - "User-defined labels on this branch." - labels: [ResourceLabel!]! -} - -"Configured PostgreSQL settings for a branch." +"Configured PostgreSQL settings for a database." type PostgresConfiguration { "Explicitly configured PostgreSQL parameters, sorted by name. Implicit default values are not included." parameters: [PostgresParameter!]! @@ -30066,11 +29628,7 @@ type Postgres implements Node { highAvailability: Boolean! "Requested CPU, memory and disk size, when present on this Postgres." resources: PostgresResources! - "Branch requested for activation; may differ from the active branch while activation is in progress." - desiredActiveBranch: String - "Currently observed active branch, if selected." - activeBranch: PostgresBranch - "Workloads referencing this Postgres, including references to inactive branches and workloads following the active branch. Each workload is included once." + "Workloads referencing this Postgres. Each workload is included once." workloads( "Get the first n items in the connection." first: Int @@ -30081,16 +29639,6 @@ type Postgres implements Node { "Get items before this cursor." before: Cursor ): PostgresWorkloadConnection! - "Branch with this local name in this Postgres." - branch(name: String!): PostgresBranch! - "Branches belonging to this Postgres." - branches( - first: Int - after: Cursor - last: Int - before: Cursor - orderBy: PostgresBranchOrder - ): PostgresBranchConnection! "User-defined labels on this Postgres." labels: [ResourceLabel!]! } @@ -30105,14 +29653,12 @@ enum PostgresState { DEGRADED } -"A workload referencing a Postgres and the branch it uses." +"A workload referencing a Postgres database." type PostgresWorkload { "The application or job referencing this Postgres." workload: Workload! "The database referenced by this workload." postgres: Postgres! - "The explicitly referenced branch, or the observed active branch when no branch is specified. Defaults to main when no active branch has been observed; a requested activation does not change this selection until observed." - branch: PostgresBranch! } "A Postgres reference from a workload's uses.postgres configuration." @@ -30121,8 +29667,6 @@ type WorkloadPostgres { envPrefix: String "Database privileges granted to the workload. Defaults to admin." role: PostgresUserRole! - "The branch this workload resolves to: the explicit branch, observed active branch, or main before an active branch is observed." - branch: PostgresBranch! "The Postgres resource referenced by this use." postgres: Postgres! } @@ -30151,25 +29695,25 @@ type WorkloadPostgresConnection { type WorkloadPostgresEdge { "Cursor for this Postgres use in the connection." cursor: Cursor! - "The Postgres use and the branch it resolves to." + "The configured Postgres use." node: WorkloadPostgres! } -"A paginated list of workload and branch relationships. Each workload is included once." +"A paginated list of workload and database relationships. Each workload is included once." type PostgresWorkloadConnection { "Pagination information, including the total number of workloads before pagination." pageInfo: PageInfo! - "Workload and branch relationships on this page." + "Workload and database relationships on this page." nodes: [PostgresWorkload!]! - "Workload and branch relationships with their pagination cursors." + "Workload and database relationships with their pagination cursors." edges: [PostgresWorkloadEdge!]! } -"A workload and branch relationship with its pagination cursor." +"A workload and database relationship with its pagination cursor." type PostgresWorkloadEdge { "Cursor for this workload in the connection." cursor: Cursor! - "The workload and the branch it uses." + "The workload and the database it uses." node: PostgresWorkload! } @@ -30203,58 +29747,6 @@ type PostgresResources { diskSize: String } -"Provisioning state and observed health of a PostgresBranch." -enum PostgresBranchState { - "The branch is healthy and ready." - AVAILABLE - "The branch is provisioning or its state has not been observed yet." - PROGRESSING - "The branch has reported a failure." - DEGRADED -} - -type PostgresBranchConnection { - pageInfo: PageInfo! - nodes: [PostgresBranch!]! - edges: [PostgresBranchEdge!]! - - """ - Facets for Postgres branches. Provides distribution counts to help narrow down results. - Facet counts are computed over the full result set (ignoring pagination) but respect the current filter. - """ - facets: PostgresBranchFacets -} - -type PostgresBranchEdge { - cursor: Cursor! - node: PostgresBranch! -} - -""" -Facets for Postgres branches, providing distribution counts across different dimensions. -""" -type PostgresBranchFacets { - "Distribution of branches by environment." - environments: [StringFacetItem!]! - - "Distribution of branches by state." - states: [PostgresBranchStateFacetItem!]! - - "Distribution of branches by user-defined labels." - labels: [LabelFacetItem!]! -} - -""" -A single facet item for Postgres branch states. -""" -type PostgresBranchStateFacetItem { - "The Postgres branch state." - state: PostgresBranchState! - - "Number of matching branches." - count: Int! -} - extend union SearchNode = Postgres extend enum SearchType { @@ -30565,15 +30057,15 @@ extend enum ActivityLogActivityType { extend type Mutation { """ EXPERIMENTAL: DO NOT USE - Create time-limited personal access to a Postgres branch. + Create time-limited personal access to a Postgres database. When the access is ready, retrieve its connection materials through PostgresAccess.connection. """ createPostgresAccess(input: CreatePostgresAccessInput!): CreatePostgresAccessPayload! - "Create a new Postgres. Its first branch, main, is created and activated by the platform." + "Create a new Postgres database." createPostgres(input: CreatePostgresInput!): CreatePostgresPayload! "Update an existing Postgres. The PostgreSQL major version cannot be changed." updatePostgres(input: UpdatePostgresInput!): UpdatePostgresPayload! - "Request deletion of an entire Postgres and all its branches/data. Fails while workloads or bindings reference it; cleanup is asynchronous." + "Request deletion of a Postgres database and its data. Fails while workloads or bindings reference it; cleanup is asynchronous." deletePostgres(input: DeletePostgresInput!): DeletePostgresPayload! } @@ -30589,11 +30081,6 @@ type CreatePostgresAccessPayload { input CreatePostgresAccessInput { "Name of the Postgres to access." postgres: String! - "Legacy branch selection. Omit for normal database access." - branch: String - @deprecated( - reason: "Branch selection is being removed. Omit this field to access the database." - ) "Team that owns the Postgres." teamSlug: Slug! "Environment containing the Postgres." @@ -30623,7 +30110,7 @@ enum PostgresAccessLevel { MAINTAIN } -"Select the Postgres to delete. All branches and stored data are removed asynchronously by the platform." +"Select the Postgres to delete. Its resources and stored data are removed asynchronously by the platform." input DeletePostgresInput { "Name of the Postgres." name: String! @@ -30639,15 +30126,6 @@ type DeletePostgresPayload { deletionRequested: Boolean! } -extend type TeamInventoryCounts { - postgresBranches: TeamInventoryCountPostgresBranches! -} - -type TeamInventoryCountPostgresBranches { - "Total number of Postgres branches." - total: Int! -} - "A time-limited personal access request for a Postgres database." type PostgresAccess implements Node { "Opaque ID for this PostgresAccess resource." @@ -30660,8 +30138,6 @@ type PostgresAccess implements Node { teamEnvironment: TeamEnvironment! "Postgres selected by this access." postgres: Postgres! - "Legacy branch view of the database selected by this access." - postgresBranch: PostgresBranch! @deprecated(reason: "Use postgres instead.") "Requested access level." accessLevel: PostgresAccessLevel! "Server-controlled expiry for this personal access." @@ -41564,16 +41040,8 @@ func (ec *executionContext) childFields_Postgres(ctx context.Context, field grap return ec.fieldContext_Postgres_highAvailability(ctx, field) case "resources": return ec.fieldContext_Postgres_resources(ctx, field) - case "desiredActiveBranch": - return ec.fieldContext_Postgres_desiredActiveBranch(ctx, field) - case "activeBranch": - return ec.fieldContext_Postgres_activeBranch(ctx, field) case "workloads": return ec.fieldContext_Postgres_workloads(ctx, field) - case "branch": - return ec.fieldContext_Postgres_branch(ctx, field) - case "branches": - return ec.fieldContext_Postgres_branches(ctx, field) case "labels": return ec.fieldContext_Postgres_labels(ctx, field) case "activityLog": @@ -41594,8 +41062,6 @@ func (ec *executionContext) childFields_PostgresAccess(ctx context.Context, fiel return ec.fieldContext_PostgresAccess_teamEnvironment(ctx, field) case "postgres": return ec.fieldContext_PostgresAccess_postgres(ctx, field) - case "postgresBranch": - return ec.fieldContext_PostgresAccess_postgresBranch(ctx, field) case "accessLevel": return ec.fieldContext_PostgresAccess_accessLevel(ctx, field) case "expiresAt": @@ -41632,36 +41098,6 @@ func (ec *executionContext) childFields_PostgresAccessConnectionDetails(ctx cont return nil, fmt.Errorf("no field named %q was found under type PostgresAccessConnectionDetails", field.Name) } -func (ec *executionContext) childFields_PostgresBranch(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_PostgresBranch_id(ctx, field) - case "name": - return ec.fieldContext_PostgresBranch_name(ctx, field) - case "createdAt": - return ec.fieldContext_PostgresBranch_createdAt(ctx, field) - case "earliestRestoreTime": - return ec.fieldContext_PostgresBranch_earliestRestoreTime(ctx, field) - case "configuration": - return ec.fieldContext_PostgresBranch_configuration(ctx, field) - case "team": - return ec.fieldContext_PostgresBranch_team(ctx, field) - case "teamEnvironment": - return ec.fieldContext_PostgresBranch_teamEnvironment(ctx, field) - case "postgres": - return ec.fieldContext_PostgresBranch_postgres(ctx, field) - case "workloads": - return ec.fieldContext_PostgresBranch_workloads(ctx, field) - case "state": - return ec.fieldContext_PostgresBranch_state(ctx, field) - case "issues": - return ec.fieldContext_PostgresBranch_issues(ctx, field) - case "labels": - return ec.fieldContext_PostgresBranch_labels(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PostgresBranch", field.Name) -} - func (ec *executionContext) childFields_PostgresBranchActivityLogEntryData(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "branch": @@ -41674,52 +41110,6 @@ func (ec *executionContext) childFields_PostgresBranchActivityLogEntryData(ctx c return nil, fmt.Errorf("no field named %q was found under type PostgresBranchActivityLogEntryData", field.Name) } -func (ec *executionContext) childFields_PostgresBranchConnection(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "pageInfo": - return ec.fieldContext_PostgresBranchConnection_pageInfo(ctx, field) - case "nodes": - return ec.fieldContext_PostgresBranchConnection_nodes(ctx, field) - case "edges": - return ec.fieldContext_PostgresBranchConnection_edges(ctx, field) - case "facets": - return ec.fieldContext_PostgresBranchConnection_facets(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PostgresBranchConnection", field.Name) -} - -func (ec *executionContext) childFields_PostgresBranchEdge(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "cursor": - return ec.fieldContext_PostgresBranchEdge_cursor(ctx, field) - case "node": - return ec.fieldContext_PostgresBranchEdge_node(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PostgresBranchEdge", field.Name) -} - -func (ec *executionContext) childFields_PostgresBranchFacets(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "environments": - return ec.fieldContext_PostgresBranchFacets_environments(ctx, field) - case "states": - return ec.fieldContext_PostgresBranchFacets_states(ctx, field) - case "labels": - return ec.fieldContext_PostgresBranchFacets_labels(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PostgresBranchFacets", field.Name) -} - -func (ec *executionContext) childFields_PostgresBranchStateFacetItem(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "state": - return ec.fieldContext_PostgresBranchStateFacetItem_state(ctx, field) - case "count": - return ec.fieldContext_PostgresBranchStateFacetItem_count(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PostgresBranchStateFacetItem", field.Name) -} - func (ec *executionContext) childFields_PostgresConfiguration(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "parameters": @@ -41832,8 +41222,6 @@ func (ec *executionContext) childFields_PostgresWorkload(ctx context.Context, fi return ec.fieldContext_PostgresWorkload_workload(ctx, field) case "postgres": return ec.fieldContext_PostgresWorkload_postgres(ctx, field) - case "branch": - return ec.fieldContext_PostgresWorkload_branch(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type PostgresWorkload", field.Name) } @@ -43246,14 +42634,6 @@ func (ec *executionContext) childFields_TeamInventoryCountOpenSearches(ctx conte return nil, fmt.Errorf("no field named %q was found under type TeamInventoryCountOpenSearches", field.Name) } -func (ec *executionContext) childFields_TeamInventoryCountPostgresBranches(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "total": - return ec.fieldContext_TeamInventoryCountPostgresBranches_total(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TeamInventoryCountPostgresBranches", field.Name) -} - func (ec *executionContext) childFields_TeamInventoryCountSecrets(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "total": @@ -43294,8 +42674,6 @@ func (ec *executionContext) childFields_TeamInventoryCounts(ctx context.Context, return ec.fieldContext_TeamInventoryCounts_kafkaTopics(ctx, field) case "openSearches": return ec.fieldContext_TeamInventoryCounts_openSearches(ctx, field) - case "postgresBranches": - return ec.fieldContext_TeamInventoryCounts_postgresBranches(ctx, field) case "secrets": return ec.fieldContext_TeamInventoryCounts_secrets(ctx, field) case "sqlInstances": @@ -44482,8 +43860,6 @@ func (ec *executionContext) childFields_WorkloadPostgres(ctx context.Context, fi return ec.fieldContext_WorkloadPostgres_envPrefix(ctx, field) case "role": return ec.fieldContext_WorkloadPostgres_role(ctx, field) - case "branch": - return ec.fieldContext_WorkloadPostgres_branch(ctx, field) case "postgres": return ec.fieldContext_WorkloadPostgres_postgres(ctx, field) } diff --git a/internal/graph/gengql/schema.generated.go b/internal/graph/gengql/schema.generated.go index 36b3addb8..7efd5f850 100644 --- a/internal/graph/gengql/schema.generated.go +++ b/internal/graph/gengql/schema.generated.go @@ -7320,13 +7320,6 @@ func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } return ec._PostgresCreatedActivityLogEntry(ctx, sel, obj) - case issue.PostgresBranchIssue: - return ec._PostgresBranchIssue(ctx, sel, &obj) - case *issue.PostgresBranchIssue: - if obj == nil { - return graphql.Null - } - return ec._PostgresBranchIssue(ctx, sel, obj) case postgres.PostgresBranchDeletedActivityLogEntry: return ec._PostgresBranchDeletedActivityLogEntry(ctx, sel, &obj) case *postgres.PostgresBranchDeletedActivityLogEntry: @@ -7348,13 +7341,6 @@ func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } return ec._PostgresBranchActivatedActivityLogEntry(ctx, sel, obj) - case postgres.PostgresBranch: - return ec._PostgresBranch(ctx, sel, &obj) - case *postgres.PostgresBranch: - if obj == nil { - return graphql.Null - } - return ec._PostgresBranch(ctx, sel, obj) case postgres.Postgres: return ec._Postgres(ctx, sel, &obj) case *postgres.Postgres: diff --git a/internal/graph/gengql/teams.generated.go b/internal/graph/gengql/teams.generated.go index 966996d5d..89db334df 100644 --- a/internal/graph/gengql/teams.generated.go +++ b/internal/graph/gengql/teams.generated.go @@ -124,7 +124,6 @@ type TeamInventoryCountsResolver interface { Jobs(ctx context.Context, obj *team.TeamInventoryCounts) (*job.TeamInventoryCountJobs, error) KafkaTopics(ctx context.Context, obj *team.TeamInventoryCounts) (*kafkatopic.TeamInventoryCountKafkaTopics, error) OpenSearches(ctx context.Context, obj *team.TeamInventoryCounts) (*opensearch.TeamInventoryCountOpenSearches, error) - PostgresBranches(ctx context.Context, obj *team.TeamInventoryCounts) (*postgres.TeamInventoryCountPostgresBranches, error) Secrets(ctx context.Context, obj *team.TeamInventoryCounts) (*secret.TeamInventoryCountSecrets, error) SQLInstances(ctx context.Context, obj *team.TeamInventoryCounts) (*sqlinstance.TeamInventoryCountSQLInstances, error) Valkeys(ctx context.Context, obj *team.TeamInventoryCounts) (*valkey.TeamInventoryCountValkeys, error) @@ -6042,38 +6041,6 @@ func (ec *executionContext) fieldContext_TeamInventoryCounts_openSearches(_ cont return fc, nil } -func (ec *executionContext) _TeamInventoryCounts_postgresBranches(ctx context.Context, field graphql.CollectedField, obj *team.TeamInventoryCounts) (ret graphql.Marshaler) { - return graphql.ResolveField( - ctx, - ec.OperationContext, - field, - func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.fieldContext_TeamInventoryCounts_postgresBranches(ctx, field) - }, - func(ctx context.Context) (any, error) { - return ec.Resolvers.TeamInventoryCounts().PostgresBranches(ctx, obj) - }, - nil, - func(ctx context.Context, selections ast.SelectionSet, v *postgres.TeamInventoryCountPostgresBranches) graphql.Marshaler { - return ec.marshalNTeamInventoryCountPostgresBranches2ᚖgithubᚗcomᚋnaisᚋapiᚋinternalᚋpersistenceᚋpostgresᚐTeamInventoryCountPostgresBranches(ctx, selections, v) - }, - true, - true, - ) -} -func (ec *executionContext) fieldContext_TeamInventoryCounts_postgresBranches(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "TeamInventoryCounts", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return ec.childFields_TeamInventoryCountPostgresBranches(ctx, field) - }, - } - return fc, nil -} - func (ec *executionContext) _TeamInventoryCounts_secrets(ctx context.Context, field graphql.CollectedField, obj *team.TeamInventoryCounts) (ret graphql.Marshaler) { return graphql.ResolveField( ctx, @@ -11698,42 +11665,6 @@ func (ec *executionContext) _TeamInventoryCounts(ctx context.Context, sel ast.Se continue } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "postgresBranches": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._TeamInventoryCounts_postgresBranches(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } - return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) case "secrets": field := field diff --git a/internal/graph/issues.resolvers.go b/internal/graph/issues.resolvers.go index 35ce0e5a1..491e5d172 100644 --- a/internal/graph/issues.resolvers.go +++ b/internal/graph/issues.resolvers.go @@ -109,14 +109,6 @@ func (r *openSearchIssueResolver) OpenSearch(ctx context.Context, obj *issue.Ope return opensearch.Get(ctx, obj.TeamSlug, obj.EnvironmentName, obj.ResourceName) } -func (r *postgresBranchIssueResolver) TeamEnvironment(ctx context.Context, obj *issue.PostgresBranchIssue) (*team.TeamEnvironment, error) { - return team.GetTeamEnvironment(ctx, obj.TeamSlug, obj.EnvironmentName) -} - -func (r *postgresBranchIssueResolver) Branch(ctx context.Context, obj *issue.PostgresBranchIssue) (*postgres.PostgresBranch, error) { - return postgres.GetPostgresBranchByObjectName(ctx, obj.TeamSlug, obj.EnvironmentName, obj.ResourceName) -} - func (r *postgresIssueResolver) TeamEnvironment(ctx context.Context, obj *issue.PostgresIssue) (*team.TeamEnvironment, error) { return team.GetTeamEnvironment(ctx, obj.TeamSlug, obj.EnvironmentName) } @@ -241,10 +233,6 @@ func (r *Resolver) OpenSearchIssue() gengql.OpenSearchIssueResolver { return &openSearchIssueResolver{r} } -func (r *Resolver) PostgresBranchIssue() gengql.PostgresBranchIssueResolver { - return &postgresBranchIssueResolver{r} -} - func (r *Resolver) PostgresIssue() gengql.PostgresIssueResolver { return &postgresIssueResolver{r} } func (r *Resolver) SqlInstanceStateIssue() gengql.SqlInstanceStateIssueResolver { @@ -282,7 +270,6 @@ type ( missingSbomIssueResolver struct{ *Resolver } noRunningInstancesIssueResolver struct{ *Resolver } openSearchIssueResolver struct{ *Resolver } - postgresBranchIssueResolver struct{ *Resolver } postgresIssueResolver struct{ *Resolver } sqlInstanceStateIssueResolver struct{ *Resolver } sqlInstanceVersionIssueResolver struct{ *Resolver } diff --git a/internal/graph/postgres.resolvers.go b/internal/graph/postgres.resolvers.go index b6a7b54ef..1c81c52c0 100644 --- a/internal/graph/postgres.resolvers.go +++ b/internal/graph/postgres.resolvers.go @@ -11,7 +11,6 @@ import ( "github.com/nais/api/internal/issue" "github.com/nais/api/internal/persistence/postgres" "github.com/nais/api/internal/team" - "github.com/nais/api/internal/workload" "github.com/nais/api/internal/workload/application" "github.com/nais/api/internal/workload/job" liberatorv1 "github.com/nais/liberator/pkg/apis/nais.io/v1" @@ -109,13 +108,6 @@ func (r *postgresResolver) Issues(ctx context.Context, obj *postgres.Postgres, f return issue.ListIssues(ctx, obj.TeamSlug, page, orderBy, scope, f) } -func (r *postgresResolver) ActiveBranch(ctx context.Context, obj *postgres.Postgres) (*postgres.PostgresBranch, error) { - if obj.ActiveBranch == nil { - return nil, nil - } - return postgres.BranchForPostgres(ctx, obj, *obj.ActiveBranch) -} - func (r *postgresResolver) Workloads(ctx context.Context, obj *postgres.Postgres, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) (*pagination.Connection[*postgres.PostgresWorkload], error) { page, err := pagination.ParsePage(first, after, last, before) if err != nil { @@ -125,18 +117,6 @@ func (r *postgresResolver) Workloads(ctx context.Context, obj *postgres.Postgres return pagination.NewConnection(pagination.Slice(workloads, page), page, len(workloads)), nil } -func (r *postgresResolver) Branch(ctx context.Context, obj *postgres.Postgres, name string) (*postgres.PostgresBranch, error) { - return postgres.BranchForPostgres(ctx, obj, name) -} - -func (r *postgresResolver) Branches(ctx context.Context, obj *postgres.Postgres, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *postgres.PostgresBranchOrder) (*pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter], error) { - page, err := pagination.ParsePage(first, after, last, before) - if err != nil { - return nil, err - } - return postgres.ListForPostgres(ctx, obj, page, orderBy), nil -} - func (r *postgresAccessResolver) Team(ctx context.Context, obj *postgres.PostgresAccess) (*team.Team, error) { return team.Get(ctx, obj.TeamSlug) } @@ -149,15 +129,7 @@ func (r *postgresAccessResolver) Postgres(ctx context.Context, obj *postgres.Pos if obj.PostgresName != "" { return postgres.GetPostgres(ctx, obj.TeamSlug, obj.EnvironmentName, obj.PostgresName) } - branch, err := postgres.GetPostgresBranchByObjectName(ctx, obj.TeamSlug, obj.EnvironmentName, obj.PostgresBranchName) - if err != nil { - return nil, err - } - return postgres.GetPostgres(ctx, obj.TeamSlug, obj.EnvironmentName, branch.PostgresName) -} - -func (r *postgresAccessResolver) PostgresBranch(ctx context.Context, obj *postgres.PostgresAccess) (*postgres.PostgresBranch, error) { - return postgres.GetPostgresBranchByObjectName(ctx, obj.TeamSlug, obj.EnvironmentName, obj.PostgresBranchName) + return postgres.GetPostgresByPhysicalName(ctx, obj.TeamSlug, obj.EnvironmentName, obj.PostgresBranchName) } func (r *postgresAccessResolver) Connection(ctx context.Context, obj *postgres.PostgresAccess) (*postgres.PostgresAccessConnectionDetails, error) { @@ -166,57 +138,6 @@ func (r *postgresAccessResolver) Connection(ctx context.Context, obj *postgres.P }) } -func (r *postgresBranchResolver) EarliestRestoreTime(ctx context.Context, obj *postgres.PostgresBranch) (*time.Time, error) { - return postgres.EarliestRestoreTime(ctx, obj) -} - -func (r *postgresBranchResolver) Team(ctx context.Context, obj *postgres.PostgresBranch) (*team.Team, error) { - return team.Get(ctx, obj.TeamSlug) -} - -func (r *postgresBranchResolver) TeamEnvironment(ctx context.Context, obj *postgres.PostgresBranch) (*team.TeamEnvironment, error) { - return team.GetTeamEnvironment(ctx, obj.TeamSlug, obj.EnvironmentName) -} - -func (r *postgresBranchResolver) Postgres(ctx context.Context, obj *postgres.PostgresBranch) (*postgres.Postgres, error) { - return postgres.GetPostgres(ctx, obj.TeamSlug, obj.EnvironmentName, obj.PostgresName) -} - -func (r *postgresBranchResolver) Workloads(ctx context.Context, obj *postgres.PostgresBranch, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor) (*pagination.Connection[workload.Workload], error) { - page, err := pagination.ParsePage(first, after, last, before) - if err != nil { - return nil, err - } - - workloads := postgres.WorkloadsForInstance(ctx, obj.TeamSlug, obj.EnvironmentName, obj.PostgresName, obj.Name) - - return pagination.NewConnection(pagination.Slice(workloads, page), page, len(workloads)), nil -} - -func (r *postgresBranchResolver) Issues(ctx context.Context, obj *postgres.PostgresBranch, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, orderBy *issue.IssueOrder, filter *issue.ResourceIssueFilter) (*issue.IssueConnection, error) { - page, err := pagination.ParsePage(first, after, last, before) - if err != nil { - return nil, err - } - scope := &issue.IssueScope{ - ResourceName: obj.PostgresName, - ResourceType: issue.ResourceTypePostgres, - Env: obj.EnvironmentName, - } - var f *issue.IssueFilter - if filter != nil { - f = &issue.IssueFilter{ResourceIssueFilter: *filter} - } - return issue.ListIssues(ctx, obj.TeamSlug, page, orderBy, scope, f) -} - -func (r *postgresBranchConnectionResolver) Facets(ctx context.Context, obj *pagination.FacetableConnection[*postgres.PostgresBranch, *postgres.PostgresBranchFilter]) (*postgres.PostgresBranchFacets, error) { - return &postgres.PostgresBranchFacets{ - AllInstances: obj.GetAllItems(), - Filter: obj.GetFilter(), - }, nil -} - func (r *postgresConnectionResolver) Facets(ctx context.Context, obj *pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter]) (*postgres.PostgresFacets, error) { filtered := make([]*postgres.Postgres, 0, len(obj.GetAllItems())) for _, pg := range obj.GetAllItems() { @@ -227,10 +148,6 @@ func (r *postgresConnectionResolver) Facets(ctx context.Context, obj *pagination return &postgres.PostgresFacets{AllInstances: obj.GetAllItems(), FilteredInstances: filtered}, nil } -func (r *postgresWorkloadResolver) Branch(ctx context.Context, obj *postgres.PostgresWorkload) (*postgres.PostgresBranch, error) { - return postgres.BranchForPostgres(ctx, obj.Postgres, obj.BranchName) -} - func (r *teamResolver) Postgreses(ctx context.Context, obj *team.Team, first *int, after *pagination.Cursor, last *int, before *pagination.Cursor, filter *postgres.TeamPostgresFilter) (*pagination.FacetableConnection[*postgres.Postgres, *postgres.TeamPostgresFilter], error) { page, err := pagination.ParsePage(first, after, last, before) if err != nil { @@ -247,35 +164,16 @@ func (r *teamEnvironmentResolver) PostgresAccess(ctx context.Context, obj *team. return postgres.GetPostgresAccess(ctx, name, obj.TeamSlug, obj.EnvironmentName) } -func (r *teamInventoryCountsResolver) PostgresBranches(ctx context.Context, obj *team.TeamInventoryCounts) (*postgres.TeamInventoryCountPostgresBranches, error) { - return &postgres.TeamInventoryCountPostgresBranches{ - Total: postgres.CountForTeam(ctx, obj.TeamSlug), - }, nil -} - func (r *Resolver) Postgres() gengql.PostgresResolver { return &postgresResolver{r} } func (r *Resolver) PostgresAccess() gengql.PostgresAccessResolver { return &postgresAccessResolver{r} } -func (r *Resolver) PostgresBranch() gengql.PostgresBranchResolver { return &postgresBranchResolver{r} } - -func (r *Resolver) PostgresBranchConnection() gengql.PostgresBranchConnectionResolver { - return &postgresBranchConnectionResolver{r} -} - func (r *Resolver) PostgresConnection() gengql.PostgresConnectionResolver { return &postgresConnectionResolver{r} } -func (r *Resolver) PostgresWorkload() gengql.PostgresWorkloadResolver { - return &postgresWorkloadResolver{r} -} - type ( - postgresResolver struct{ *Resolver } - postgresAccessResolver struct{ *Resolver } - postgresBranchResolver struct{ *Resolver } - postgresBranchConnectionResolver struct{ *Resolver } - postgresConnectionResolver struct{ *Resolver } - postgresWorkloadResolver struct{ *Resolver } + postgresResolver struct{ *Resolver } + postgresAccessResolver struct{ *Resolver } + postgresConnectionResolver struct{ *Resolver } ) diff --git a/internal/graph/postgres_schema_test.go b/internal/graph/postgres_schema_test.go index 042264f07..52302c25c 100644 --- a/internal/graph/postgres_schema_test.go +++ b/internal/graph/postgres_schema_test.go @@ -37,7 +37,8 @@ func TestPostgresSchemaRetainsDatabaseOperationsAndBranchHistory(t *testing.T) { } } for _, name := range []string{ - "PostgresBranch", + "Postgres", + "PostgresIssue", "PostgresBranchCreatedActivityLogEntry", "PostgresBranchActivatedActivityLogEntry", "PostgresBranchDeletedActivityLogEntry", @@ -47,3 +48,26 @@ func TestPostgresSchemaRetainsDatabaseOperationsAndBranchHistory(t *testing.T) { } } } + +func TestPostgresSchemaRetiresBranchReads(t *testing.T) { + schema := gengql.NewExecutableSchema(gengql.Config{}).Schema() + for _, name := range []string{"PostgresBranch", "PostgresBranchIssue", "PostgresBranchConnection", "PostgresBranchFilter", "PostgresBranchOrder", "PostgresBranchState", "PostgresBranchFacets", "TeamInventoryCountPostgresBranches"} { + if schema.Types[name] != nil { + t.Errorf("retired type %s is still exposed", name) + } + } + for name, fields := range map[string][]string{ + "Postgres": {"activeBranch", "desiredActiveBranch", "branch", "branches"}, + "PostgresAccess": {"postgresBranch"}, + "PostgresWorkload": {"branch"}, + "WorkloadPostgres": {"branch"}, + "TeamInventoryCounts": {"postgresBranches"}, + "CreatePostgresAccessInput": {"branch"}, + } { + for _, field := range fields { + if schema.Types[name].Fields.ForName(field) != nil { + t.Errorf("retired field %s.%s is still exposed", name, field) + } + } + } +} diff --git a/internal/graph/schema/issues.graphqls b/internal/graph/schema/issues.graphqls index 4722bfbc1..d583bbd1f 100644 --- a/internal/graph/schema/issues.graphqls +++ b/internal/graph/schema/issues.graphqls @@ -269,8 +269,6 @@ enum Severity { enum ResourceType { "Postgres database." POSTGRES - "A branch of a Postgres database." - POSTGRES_BRANCH @deprecated(reason: "Use POSTGRES instead.") OPENSEARCH VALKEY SQLINSTANCE @@ -282,8 +280,6 @@ enum ResourceType { enum IssueType { "Postgres database failure." POSTGRES - "Raised when a Postgres branch has reported a failure." - POSTGRES_BRANCH @deprecated(reason: "Use POSTGRES instead.") OPENSEARCH VALKEY SQLINSTANCE_STATE @@ -428,20 +424,6 @@ type PostgresIssue implements Issue & Node { postgres: Postgres! } -"Legacy issue type, no longer returned. Use PostgresIssue instead." -type PostgresBranchIssue implements Issue & Node { - "Unique identifier for this issue." - id: ID! - "Team environment containing the affected branch." - teamEnvironment: TeamEnvironment! - "Severity of the reported failure." - severity: Severity! - "Description of the reported failure." - message: String! - "The branch that reported the failure." - branch: PostgresBranch! @deprecated(reason: "Use PostgresIssue.postgres instead.") -} - type SqlInstanceVersionIssue implements Issue & Node { id: ID! teamEnvironment: TeamEnvironment! diff --git a/internal/graph/schema/postgres.graphqls b/internal/graph/schema/postgres.graphqls index 0e3872642..8b0fd36c7 100644 --- a/internal/graph/schema/postgres.graphqls +++ b/internal/graph/schema/postgres.graphqls @@ -12,7 +12,7 @@ extend type AvailableValues { } extend type Team { - "Postgres databases owned by the team, including those without branches." + "Postgres databases owned by the team." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -41,7 +41,7 @@ extend type TeamEnvironment { } extend interface Workload { - "Postgres references configured in uses.postgres, including their resolved branch." + "Postgres references configured in uses.postgres." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -55,7 +55,7 @@ extend interface Workload { } extend type Application { - "Postgres references configured in uses.postgres, including their resolved branch." + "Postgres references configured in uses.postgres." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -69,7 +69,7 @@ extend type Application { } extend type Job { - "Postgres references configured in uses.postgres, including their resolved branch." + "Postgres references configured in uses.postgres." postgreses( "Get the first n items in the connection. This can be used in combination with the after parameter." first: Int @@ -90,84 +90,7 @@ input TeamPostgresFilter { labels: [LabelFilter!] } -input PostgresBranchOrder { - field: PostgresBranchOrderField! - direction: OrderDirection! -} - -""" -Input for filtering Postgres branches. -""" -input PostgresBranchFilter { - "Filter by the name of the branch." - name: String - - "Filter by environments." - environments: [String!] - - "Filter by branch state." - states: [PostgresBranchState!] - - "Filter by user-defined labels. All listed labels must match." - labels: [LabelFilter!] -} - -enum PostgresBranchOrderField { - NAME - ENVIRONMENT -} - -"A named PostgresBranch belonging to a Postgres." -type PostgresBranch implements Persistence & Node { - id: ID! - "Local name of this branch within its Postgres." - name: String! - "Time when this branch was created." - createdAt: Time! - "Earliest time the branch can currently be restored from its archived backups." - earliestRestoreTime: Time - "Configured PostgreSQL settings for this branch. Null until configuration is available." - configuration: PostgresConfiguration - team: Team! - teamEnvironment: TeamEnvironment! - "Postgres owning this PostgresBranch." - postgres: Postgres! - "Workloads explicitly using this branch, or following it while it is active." - workloads( - "Get the first n items in the connection. This can be used in combination with the after parameter." - first: Int - - "Get items after this cursor." - after: Cursor - - "Get the last n items in the connection. This can be used in combination with the before parameter." - last: Int - - "Get items before this cursor." - before: Cursor - ): WorkloadConnection! - "Current observed state of the branch." - state: PostgresBranchState! - "Issues affecting this branch." - issues( - "Get the first n items in the connection." - first: Int - "Get items after this cursor." - after: Cursor - "Get the last n items in the connection." - last: Int - "Get items before this cursor." - before: Cursor - "Ordering options for the issues." - orderBy: IssueOrder - "Filtering options for the issues." - filter: ResourceIssueFilter - ): IssueConnection! - "User-defined labels on this branch." - labels: [ResourceLabel!]! -} - -"Configured PostgreSQL settings for a branch." +"Configured PostgreSQL settings for a database." type PostgresConfiguration { "Explicitly configured PostgreSQL parameters, sorted by name. Implicit default values are not included." parameters: [PostgresParameter!]! @@ -222,11 +145,7 @@ type Postgres implements Node { highAvailability: Boolean! "Requested CPU, memory and disk size, when present on this Postgres." resources: PostgresResources! - "Branch requested for activation; may differ from the active branch while activation is in progress." - desiredActiveBranch: String - "Currently observed active branch, if selected." - activeBranch: PostgresBranch - "Workloads referencing this Postgres, including references to inactive branches and workloads following the active branch. Each workload is included once." + "Workloads referencing this Postgres. Each workload is included once." workloads( "Get the first n items in the connection." first: Int @@ -237,16 +156,6 @@ type Postgres implements Node { "Get items before this cursor." before: Cursor ): PostgresWorkloadConnection! - "Branch with this local name in this Postgres." - branch(name: String!): PostgresBranch! - "Branches belonging to this Postgres." - branches( - first: Int - after: Cursor - last: Int - before: Cursor - orderBy: PostgresBranchOrder - ): PostgresBranchConnection! "User-defined labels on this Postgres." labels: [ResourceLabel!]! } @@ -261,14 +170,12 @@ enum PostgresState { DEGRADED } -"A workload referencing a Postgres and the branch it uses." +"A workload referencing a Postgres database." type PostgresWorkload { "The application or job referencing this Postgres." workload: Workload! "The database referenced by this workload." postgres: Postgres! - "The explicitly referenced branch, or the observed active branch when no branch is specified. Defaults to main when no active branch has been observed; a requested activation does not change this selection until observed." - branch: PostgresBranch! } "A Postgres reference from a workload's uses.postgres configuration." @@ -277,8 +184,6 @@ type WorkloadPostgres { envPrefix: String "Database privileges granted to the workload. Defaults to admin." role: PostgresUserRole! - "The branch this workload resolves to: the explicit branch, observed active branch, or main before an active branch is observed." - branch: PostgresBranch! "The Postgres resource referenced by this use." postgres: Postgres! } @@ -307,25 +212,25 @@ type WorkloadPostgresConnection { type WorkloadPostgresEdge { "Cursor for this Postgres use in the connection." cursor: Cursor! - "The Postgres use and the branch it resolves to." + "The configured Postgres use." node: WorkloadPostgres! } -"A paginated list of workload and branch relationships. Each workload is included once." +"A paginated list of workload and database relationships. Each workload is included once." type PostgresWorkloadConnection { "Pagination information, including the total number of workloads before pagination." pageInfo: PageInfo! - "Workload and branch relationships on this page." + "Workload and database relationships on this page." nodes: [PostgresWorkload!]! - "Workload and branch relationships with their pagination cursors." + "Workload and database relationships with their pagination cursors." edges: [PostgresWorkloadEdge!]! } -"A workload and branch relationship with its pagination cursor." +"A workload and database relationship with its pagination cursor." type PostgresWorkloadEdge { "Cursor for this workload in the connection." cursor: Cursor! - "The workload and the branch it uses." + "The workload and the database it uses." node: PostgresWorkload! } @@ -359,58 +264,6 @@ type PostgresResources { diskSize: String } -"Provisioning state and observed health of a PostgresBranch." -enum PostgresBranchState { - "The branch is healthy and ready." - AVAILABLE - "The branch is provisioning or its state has not been observed yet." - PROGRESSING - "The branch has reported a failure." - DEGRADED -} - -type PostgresBranchConnection { - pageInfo: PageInfo! - nodes: [PostgresBranch!]! - edges: [PostgresBranchEdge!]! - - """ - Facets for Postgres branches. Provides distribution counts to help narrow down results. - Facet counts are computed over the full result set (ignoring pagination) but respect the current filter. - """ - facets: PostgresBranchFacets -} - -type PostgresBranchEdge { - cursor: Cursor! - node: PostgresBranch! -} - -""" -Facets for Postgres branches, providing distribution counts across different dimensions. -""" -type PostgresBranchFacets { - "Distribution of branches by environment." - environments: [StringFacetItem!]! - - "Distribution of branches by state." - states: [PostgresBranchStateFacetItem!]! - - "Distribution of branches by user-defined labels." - labels: [LabelFacetItem!]! -} - -""" -A single facet item for Postgres branch states. -""" -type PostgresBranchStateFacetItem { - "The Postgres branch state." - state: PostgresBranchState! - - "Number of matching branches." - count: Int! -} - extend union SearchNode = Postgres extend enum SearchType { @@ -721,15 +574,15 @@ extend enum ActivityLogActivityType { extend type Mutation { """ EXPERIMENTAL: DO NOT USE - Create time-limited personal access to a Postgres branch. + Create time-limited personal access to a Postgres database. When the access is ready, retrieve its connection materials through PostgresAccess.connection. """ createPostgresAccess(input: CreatePostgresAccessInput!): CreatePostgresAccessPayload! - "Create a new Postgres. Its first branch, main, is created and activated by the platform." + "Create a new Postgres database." createPostgres(input: CreatePostgresInput!): CreatePostgresPayload! "Update an existing Postgres. The PostgreSQL major version cannot be changed." updatePostgres(input: UpdatePostgresInput!): UpdatePostgresPayload! - "Request deletion of an entire Postgres and all its branches/data. Fails while workloads or bindings reference it; cleanup is asynchronous." + "Request deletion of a Postgres database and its data. Fails while workloads or bindings reference it; cleanup is asynchronous." deletePostgres(input: DeletePostgresInput!): DeletePostgresPayload! } @@ -745,11 +598,6 @@ type CreatePostgresAccessPayload { input CreatePostgresAccessInput { "Name of the Postgres to access." postgres: String! - "Legacy branch selection. Omit for normal database access." - branch: String - @deprecated( - reason: "Branch selection is being removed. Omit this field to access the database." - ) "Team that owns the Postgres." teamSlug: Slug! "Environment containing the Postgres." @@ -779,7 +627,7 @@ enum PostgresAccessLevel { MAINTAIN } -"Select the Postgres to delete. All branches and stored data are removed asynchronously by the platform." +"Select the Postgres to delete. Its resources and stored data are removed asynchronously by the platform." input DeletePostgresInput { "Name of the Postgres." name: String! @@ -795,15 +643,6 @@ type DeletePostgresPayload { deletionRequested: Boolean! } -extend type TeamInventoryCounts { - postgresBranches: TeamInventoryCountPostgresBranches! -} - -type TeamInventoryCountPostgresBranches { - "Total number of Postgres branches." - total: Int! -} - "A time-limited personal access request for a Postgres database." type PostgresAccess implements Node { "Opaque ID for this PostgresAccess resource." @@ -816,8 +655,6 @@ type PostgresAccess implements Node { teamEnvironment: TeamEnvironment! "Postgres selected by this access." postgres: Postgres! - "Legacy branch view of the database selected by this access." - postgresBranch: PostgresBranch! @deprecated(reason: "Use postgres instead.") "Requested access level." accessLevel: PostgresAccessLevel! "Server-controlled expiry for this personal access." diff --git a/internal/grpc/grpcdatabase/postgres_branch_test.go b/internal/grpc/grpcdatabase/postgres_branch_test.go deleted file mode 100644 index c9b10d676..000000000 --- a/internal/grpc/grpcdatabase/postgres_branch_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package grpcdatabase - -import ( - "testing" - - "github.com/nais/api/internal/persistence/postgres" -) - -func TestPostgresBranchDatabaseName(t *testing.T) { - for _, tt := range []struct { - branch string - want string - }{ - {branch: "main", want: "orders"}, - {branch: "recovered", want: "orders/recovered"}, - } { - t.Run(tt.branch, func(t *testing.T) { - got := postgresBranchToProto(&postgres.PostgresBranch{PostgresName: "orders", Name: tt.branch}) - if got.Name != tt.want { - t.Errorf("database name = %q, want %q", got.Name, tt.want) - } - }) - } -} diff --git a/internal/grpc/grpcdatabase/postgres_test.go b/internal/grpc/grpcdatabase/postgres_test.go new file mode 100644 index 000000000..a7444c915 --- /dev/null +++ b/internal/grpc/grpcdatabase/postgres_test.go @@ -0,0 +1,15 @@ +package grpcdatabase + +import ( + "testing" + + "github.com/nais/api/internal/persistence/postgres" + "github.com/nais/api/pkg/apiclient/protoapi" +) + +func TestPostgresDatabaseInventory(t *testing.T) { + got := postgresToProto(&postgres.Postgres{Name: "orders", TeamSlug: "team", EnvironmentName: "dev"}) + if got.Name != "orders" || got.Database != "app" || got.TeamSlug != "team" || got.Environment != "dev" || got.Type != protoapi.DatabaseType_NAIS_POSTGRES { + t.Errorf("unexpected logical database inventory: %+v", got) + } +} diff --git a/internal/grpc/grpcdatabase/server.go b/internal/grpc/grpcdatabase/server.go index 02fa0acdf..73833a0f1 100644 --- a/internal/grpc/grpcdatabase/server.go +++ b/internal/grpc/grpcdatabase/server.go @@ -29,14 +29,12 @@ func NewServer(sqlDatabaseWatcher *watchers.SqlDatabaseWatcher, postgresWatcher func (s *Server) List(_ context.Context, r *protoapi.ListDatabasesRequest) (*protoapi.ListDatabasesResponse, error) { sqlDatabases := watcher.Objects(s.sqlDatabaseWatcher.GetByNamespace(r.TeamSlug)) postgreses := watcher.Objects(s.postgresWatcher.GetByNamespace(r.TeamSlug, watcher.WithoutDeleted())) - postgresBranches := postgres.MainViews(postgreses) - - all := make([]*protoapi.Database, 0, len(sqlDatabases)+len(postgresBranches)) + all := make([]*protoapi.Database, 0, len(sqlDatabases)+len(postgreses)) for _, d := range sqlDatabases { all = append(all, sqlDatabaseToProto(d)) } - for _, p := range postgresBranches { - all = append(all, postgresBranchToProto(p)) + for _, p := range postgreses { + all = append(all, postgresToProto(p)) } // Sort by (type, environment, name, database) for deterministic pagination. @@ -78,13 +76,9 @@ func sqlDatabaseToProto(d *sqlinstance.SQLDatabase) *protoapi.Database { } } -func postgresBranchToProto(p *postgres.PostgresBranch) *protoapi.Database { - name := p.PostgresName - if p.Name != "main" { - name += "/" + p.Name - } +func postgresToProto(p *postgres.Postgres) *protoapi.Database { return &protoapi.Database{ - Name: name, + Name: p.Name, Database: "app", Environment: p.EnvironmentName, TeamSlug: p.TeamSlug.String(), diff --git a/internal/issue/model.go b/internal/issue/model.go index bdd293b7b..0bfb0ba77 100644 --- a/internal/issue/model.go +++ b/internal/issue/model.go @@ -61,16 +61,6 @@ func (PostgresIssue) IsIssue() {} func (PostgresIssue) IsNode() {} -// Deprecated: retained only to validate old GraphQL client documents. No longer -// produced by the checker or by stored issue conversion. -type PostgresBranchIssue struct { - Base -} - -func (PostgresBranchIssue) IsIssue() {} - -func (PostgresBranchIssue) IsNode() {} - type SqlInstanceVersionIssue struct { Base } diff --git a/internal/kubernetes/watchers/postgres_contract_test.go b/internal/kubernetes/watchers/postgres_contract_test.go index 48a2c35b4..16e2dca12 100644 --- a/internal/kubernetes/watchers/postgres_contract_test.go +++ b/internal/kubernetes/watchers/postgres_contract_test.go @@ -75,9 +75,6 @@ func TestPostgresContractsWithoutBranchAPI(t *testing.T) { if len(views) != 1 || views[0].Name != "main" || views[0].State != postgres.PostgresBranchStateAvailable { t.Fatalf("main facade = %+v", views) } - if _, err := postgres.GetPostgresBranchByIdent(ctx, views[0].ID()); err != nil { - t.Fatal(err) - } if _, err := postgres.GetPostgresBranchByObjectName(ctx, "team", "dev", v1.PostgresPhysicalName("orders")); err != nil { t.Fatal(err) } diff --git a/internal/persistence/postgres/models.go b/internal/persistence/postgres/models.go index bab90e2dd..51f1fe72a 100644 --- a/internal/persistence/postgres/models.go +++ b/internal/persistence/postgres/models.go @@ -201,10 +201,6 @@ func (e PostgresBranchState) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } -func (PostgresBranch) IsPersistence() {} - -func (PostgresBranch) IsNode() {} - type DeletePostgresInput struct { Name string `json:"name"` TeamSlug slug.Slug `json:"teamSlug"` @@ -360,10 +356,6 @@ func (p *PostgresBranch) GetLabels() map[string]string { return nil } -func (p *PostgresBranch) ID() ident.Ident { - return newIdent(p.TeamSlug, p.EnvironmentName, p.PostgresName, p.Name) -} - func toPostgresBranch(u *unstructured.Unstructured, environmentName string) (*PostgresBranch, error) { obj := &nais_io_v1.PostgresBranch{} if err := runtime.DefaultUnstructuredConverter.FromUnstructured(u.Object, obj); err != nil { diff --git a/internal/persistence/postgres/models_test.go b/internal/persistence/postgres/models_test.go index 680bcc660..5eefe0fce 100644 --- a/internal/persistence/postgres/models_test.go +++ b/internal/persistence/postgres/models_test.go @@ -33,13 +33,6 @@ func TestToPostgresBranch(t *testing.T) { if got.GetName() != obj.GetName() { t.Errorf("watcher name = %q, want %q", got.GetName(), obj.GetName()) } - if got.ID().Type != "PBR" { - t.Errorf("PostgresBranch ID type = %q, want PBR", got.ID().Type) - } - team, env, pg, branch, err := parsePostgresBranchIdent(got.ID()) - if err != nil || team != "my-team" || env != "dev" || pg != "orders" || branch != "restored" { - t.Errorf("branch ID = (%q, %q, %q, %q, %v)", team, env, pg, branch, err) - } } func TestToPostgresBranchWithoutStatus(t *testing.T) { diff --git a/internal/persistence/postgres/node.go b/internal/persistence/postgres/node.go index d7b824dbe..4be539085 100644 --- a/internal/persistence/postgres/node.go +++ b/internal/persistence/postgres/node.go @@ -10,30 +10,15 @@ import ( type identType int const ( - identPostgresBranch identType = iota - identPostgresAccess + identPostgresAccess identType = iota identPostgres ) func init() { - ident.RegisterIdentType(identPostgresBranch, "PBR", GetPostgresBranchByIdent) ident.RegisterIdentType(identPostgresAccess, "PA", GetPostgresAccessByIdent) ident.RegisterIdentType(identPostgres, "PG", GetPostgresByIdent) } -func parsePostgresBranchIdent(id ident.Ident) (teamSlug slug.Slug, environmentName, postgresName, branchName string, err error) { - parts := id.Parts() - if len(parts) != 4 { - return "", "", "", "", fmt.Errorf("invalid ident") - } - - return slug.Slug(parts[0]), parts[1], parts[2], parts[3], nil -} - -func newIdent(teamSlug slug.Slug, environmentName, postgresName, branchName string) ident.Ident { - return ident.NewIdent(identPostgresBranch, teamSlug.String(), environmentName, postgresName, branchName) -} - func parseAccessIdent(id ident.Ident) (teamSlug slug.Slug, environmentName, name string, err error) { parts := id.Parts() if len(parts) != 3 { diff --git a/internal/persistence/postgres/physical_status_test.go b/internal/persistence/postgres/physical_status_test.go index d18b8b57b..a5b36703f 100644 --- a/internal/persistence/postgres/physical_status_test.go +++ b/internal/persistence/postgres/physical_status_test.go @@ -75,8 +75,8 @@ func TestDirectPostgresPhysicalStatus(t *testing.T) { } branch := mainBranchView(pg) legacy := &PostgresBranch{Name: "main", PostgresName: pg.Name, TeamSlug: pg.TeamSlug, EnvironmentName: pg.EnvironmentName} - if branch.ID() != legacy.ID() { - t.Error("virtual main changed the legacy node ID") + if branch.GetName() != legacy.GetName() { + t.Error("physical view changed the legacy resource identity") } if branch.clusterName() != *pg.directClusterName { t.Error("virtual main did not preserve the observed physical target") diff --git a/internal/persistence/postgres/queries.go b/internal/persistence/postgres/queries.go index d45f04398..47417b654 100644 --- a/internal/persistence/postgres/queries.go +++ b/internal/persistence/postgres/queries.go @@ -166,15 +166,6 @@ func CountForTeam(ctx context.Context, teamSlug slug.Slug) int { return len(ListAllForTeam(ctx, teamSlug, nil)) } -func GetPostgresBranchByIdent(ctx context.Context, id ident.Ident) (*PostgresBranch, error) { - teamSlug, environmentName, postgresName, branchName, err := parsePostgresBranchIdent(id) - if err != nil { - return nil, err - } - - return GetPostgresBranch(ctx, teamSlug, environmentName, postgresName, branchName) -} - func GetPostgresByIdent(ctx context.Context, id ident.Ident) (*Postgres, error) { teamSlug, environmentName, name, err := parseAccessIdent(id) if err != nil { From 8ee3e4f1ba9fc895799a00eb8344c283f407a7da Mon Sep 17 00:00:00 2001 From: Frode Sundby Date: Fri, 13 Nov 2026 11:09:34 +0100 Subject: [PATCH 2/2] fix(issues): normalize legacy Postgres filters and facets Normalize stored POSTGRES_BRANCH issue/resource types for filtering, ordering, and facet aggregation before checker refresh. Match legacy physical names for logical database filters and scopes while preserving stored row IDs and conversion metadata. Cover pre-refresh reads, mixed snapshots, zero-count facets, and scope isolation in integration tests. --- integration_tests/postgres_issues.lua | 88 +++++++++++++++ internal/issue/facets.go | 2 + internal/issue/issuesql/issue.sql.go | 151 ++++++++++++++++++-------- internal/issue/issuesql/querier.go | 2 + internal/issue/legacy_postgres.go | 13 +++ internal/issue/queries.go | 1 + internal/issue/queries/issue.sql | 69 ++++++++++-- 7 files changed, 274 insertions(+), 52 deletions(-) create mode 100644 internal/issue/legacy_postgres.go diff --git a/integration_tests/postgres_issues.lua b/integration_tests/postgres_issues.lua index 8eda479a7..892e30851 100644 --- a/integration_tests/postgres_issues.lua +++ b/integration_tests/postgres_issues.lua @@ -118,6 +118,94 @@ Test.gql("Old stored rows are exposed as PostgresIssue with the same Node ID", f } } end) +local function teamPostgresFacets(count) + -- Team facets intentionally retain unrelated options with zero matches. + return { + resourceTypes = { { resourceType = "APPLICATION", count = 0 }, { resourceType = "JOB", count = 0 }, { resourceType = "POSTGRES", count = count } }, + issueTypes = { { issueType = "DEPRECATED_REGISTRY", count = 0 }, { issueType = "NO_RUNNING_INSTANCES", count = 0 }, { issueType = "POSTGRES", count = count } }, + } +end + +for _, filter in ipairs({ "resourceType: POSTGRES", "issueType: POSTGRES", "resourceType: POSTGRES, issueType: POSTGRES" }) do + Test.gql("Legacy rows match canonical issue filters before refresh: " .. filter, function(t) + t.addHeader("x-user-email", user:email()) + t.query([[{ team(slug: "someteamname") { + issues(filter: { ]] .. filter .. [[ }) { + pageInfo { totalCount } + nodes { __typename id ... on PostgresIssue { postgres { name } } } + facets { resourceTypes { resourceType count } issueTypes { issueType count } } + } + } }]]) + t.check { data = { team = { issues = { + pageInfo = { totalCount = 1 }, + nodes = { { __typename = "PostgresIssue", id = State.postgres_issue_id, postgres = { name = "broken" } } }, + facets = teamPostgresFacets(1), + } } } } + end) +end + +Test.gql("Legacy rows retain logical resource filters and database scopes before refresh", function(t) + t.addHeader("x-user-email", user:email()) + t.query [[{ team(slug: "someteamname") { + issues(filter: { resourceType: POSTGRES, issueType: POSTGRES, resourceName: "broken", environments: ["dev"] }) { + pageInfo { totalCount } nodes { __typename } + facets { resourceTypes { resourceType count } issueTypes { issueType count } } + } + environment(name: "dev") { + postgres(name: "broken") { + issues(filter: { issueType: POSTGRES }) { + pageInfo { totalCount } nodes { __typename } + facets { resourceTypes { resourceType count } issueTypes { issueType count } } + } + } + other: postgres(name: "another-db") { issues { pageInfo { totalCount } } } + filteredOut: postgres(name: "broken") { + issues(filter: { severity: WARNING }) { pageInfo { totalCount } facets { resourceTypes { resourceType count } issueTypes { issueType count } } } + } + } + staging: environment(name: "staging") { postgres(name: "foobar") { issues { pageInfo { totalCount } } } } + } }]] + local expected = { + pageInfo = { totalCount = 1 }, + nodes = { { __typename = "PostgresIssue" } }, + facets = { resourceTypes = { { resourceType = "POSTGRES", count = 1 } }, issueTypes = { { issueType = "POSTGRES", count = 1 } } }, + } + t.check { data = { team = { + issues = { pageInfo = expected.pageInfo, nodes = expected.nodes, facets = teamPostgresFacets(1) }, + environment = { + postgres = { issues = expected }, + other = { issues = { pageInfo = { totalCount = 0 } } }, + filteredOut = { issues = { + pageInfo = { totalCount = 0 }, + facets = { resourceTypes = { { resourceType = "POSTGRES", count = 0 } }, issueTypes = { { issueType = "POSTGRES", count = 0 } } }, + } }, + }, + staging = { postgres = { issues = { pageInfo = { totalCount = 0 } } } }, + } } } +end) + +-- Mixed snapshots are also possible while old and new checker versions overlap. +Helper.SQLExec([[ + INSERT INTO issues (issue_type, resource_type, resource_name, team, env, severity, message) + VALUES ('POSTGRES', 'POSTGRES', 'another-db', 'someteamname', 'dev', 'CRITICAL', 'Database failure') +]]) + +Test.gql("Mixed legacy and canonical rows aggregate into a single Postgres facet", function(t) + t.addHeader("x-user-email", user:email()) + t.query [[{ team(slug: "someteamname") { + issues(filter: { resourceType: POSTGRES, issueType: POSTGRES }) { + pageInfo { totalCount } + facets { resourceTypes { resourceType count } issueTypes { issueType count } severities { severity count } } + } + } }]] + local facets = teamPostgresFacets(2) + facets.severities = { { severity = "CRITICAL", count = 2 }, { severity = "WARNING", count = 0 } } + t.check { data = { team = { issues = { + pageInfo = { totalCount = 2 }, + facets = facets, + } } } } +end) + checker:runChecks() Test.sql("Checker replaces the legacy snapshot rather than duplicating issues", function(t) diff --git a/internal/issue/facets.go b/internal/issue/facets.go index 382518a60..cae772183 100644 --- a/internal/issue/facets.go +++ b/internal/issue/facets.go @@ -39,6 +39,8 @@ func ComputeFacets(ctx context.Context, connection *IssueConnection) (*IssueFace } } + params.LegacyScopeResourceName = legacyPostgresIssueName(params.ScopeResourceName) + params.LegacyFilterResourceName = legacyPostgresIssueName(params.FilterResourceName) rows, err := db(ctx).FacetsForIssues(ctx, params) if err != nil { return nil, err diff --git a/internal/issue/issuesql/issue.sql.go b/internal/issue/issuesql/issue.sql.go index f711dd877..129afbc7b 100644 --- a/internal/issue/issuesql/issue.sql.go +++ b/internal/issue/issuesql/issue.sql.go @@ -12,6 +12,29 @@ import ( ) const facetsForIssues = `-- name: FacetsForIssues :many +WITH + issue_rows AS ( + SELECT + team, + severity, + env, + resource_name, + ( + CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END + )::TEXT AS resource_type, + ( + CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END + )::TEXT AS issue_type, + resource_type = 'POSTGRES_BRANCH' AS legacy_postgres + FROM + issues + ) SELECT team, EXISTS ( @@ -47,30 +70,38 @@ SELECT AND ( $5::TEXT IS NULL OR resource_name = $5::TEXT + OR ( + legacy_postgres + AND resource_name = $6::TEXT + ) ) ) AS filtered_count FROM - issues + issue_rows AS issues WHERE ( - $6::TEXT = '' - OR team = $6 - ) - AND ( - $7::slug[] IS NULL - OR team = ANY ($7::slug[]) + $7::TEXT = '' + OR team = $7 ) AND ( - $8::TEXT IS NULL - OR resource_type = $8::TEXT + $8::slug[] IS NULL + OR team = ANY ($8::slug[]) ) AND ( $9::TEXT IS NULL - OR resource_name = $9::TEXT + OR resource_type = $9::TEXT ) AND ( $10::TEXT IS NULL - OR env = $10::TEXT + OR resource_name = $10::TEXT + OR ( + legacy_postgres + AND resource_name = $11::TEXT + ) + ) + AND ( + $12::TEXT IS NULL + OR env = $12::TEXT ) GROUP BY team, @@ -87,16 +118,18 @@ ORDER BY ` type FacetsForIssuesParams struct { - Env []string - IssueType *string - Severity *SeverityLevel - FilterResourceType *string - FilterResourceName *string - Team string - TeamSlugs []slug.Slug - ScopeResourceType *string - ScopeResourceName *string - ScopeEnv *string + Env []string + IssueType *string + Severity *SeverityLevel + FilterResourceType *string + FilterResourceName *string + LegacyFilterResourceName *string + Team string + TeamSlugs []slug.Slug + ScopeResourceType *string + ScopeResourceName *string + LegacyScopeResourceName *string + ScopeEnv *string } type FacetsForIssuesRow struct { @@ -109,6 +142,8 @@ type FacetsForIssuesRow struct { FilteredCount int64 } +// Normalize before grouping, including zero-count facets. Keep ListIssues' stored +// row types intact so legacy physical names still reach the Postgres read adapter. func (q *Queries) FacetsForIssues(ctx context.Context, arg FacetsForIssuesParams) ([]*FacetsForIssuesRow, error) { rows, err := q.db.Query(ctx, facetsForIssues, arg.Env, @@ -116,10 +151,12 @@ func (q *Queries) FacetsForIssues(ctx context.Context, arg FacetsForIssuesParams arg.Severity, arg.FilterResourceType, arg.FilterResourceName, + arg.LegacyFilterResourceName, arg.Team, arg.TeamSlugs, arg.ScopeResourceType, arg.ScopeResourceName, + arg.LegacyScopeResourceName, arg.ScopeEnv, ) if err != nil { @@ -234,7 +271,10 @@ WHERE ) AND ( $4::TEXT IS NULL - OR issue_type = $4::TEXT + OR CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END = $4::TEXT ) AND ( $5::severity_level IS NULL @@ -242,62 +282,82 @@ WHERE ) AND ( $6::TEXT IS NULL - OR resource_type = $6::TEXT + OR CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END = $6::TEXT ) AND ( $7::TEXT IS NULL OR resource_name = $7::TEXT + OR ( + resource_type = 'POSTGRES_BRANCH' + AND resource_name = $8::TEXT + ) ) ORDER BY CASE - WHEN $8::TEXT = 'env:asc' THEN env + WHEN $9::TEXT = 'env:asc' THEN env END ASC, CASE - WHEN $8::TEXT = 'env:desc' THEN env + WHEN $9::TEXT = 'env:desc' THEN env END DESC, CASE - WHEN $8::TEXT = 'issue_type:asc' THEN issue_type + WHEN $9::TEXT = 'issue_type:asc' THEN CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END END ASC, CASE - WHEN $8::TEXT = 'issue_type:desc' THEN issue_type + WHEN $9::TEXT = 'issue_type:desc' THEN CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END END DESC, CASE - WHEN $8::TEXT = 'resource_type:asc' THEN resource_type + WHEN $9::TEXT = 'resource_type:asc' THEN CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END END ASC, CASE - WHEN $8::TEXT = 'resource_type:desc' THEN resource_type + WHEN $9::TEXT = 'resource_type:desc' THEN CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END END DESC, CASE - WHEN $8::TEXT = 'resource_name:asc' THEN resource_name + WHEN $9::TEXT = 'resource_name:asc' THEN resource_name END ASC, CASE - WHEN $8::TEXT = 'resource_name:desc' THEN resource_name + WHEN $9::TEXT = 'resource_name:desc' THEN resource_name END DESC, CASE - WHEN $8::TEXT = 'severity:asc' THEN severity + WHEN $9::TEXT = 'severity:asc' THEN severity END ASC, CASE - WHEN $8::TEXT = 'severity:desc' THEN severity + WHEN $9::TEXT = 'severity:desc' THEN severity END DESC, severity DESC, id OFFSET - $9 -LIMIT $10 +LIMIT + $11 ` type ListIssuesParams struct { - Team string - TeamSlugs []slug.Slug - Env []string - IssueType *string - Severity *SeverityLevel - ResourceType *string - ResourceName *string - OrderBy string - Offset int32 - Limit int32 + Team string + TeamSlugs []slug.Slug + Env []string + IssueType *string + Severity *SeverityLevel + ResourceType *string + ResourceName *string + LegacyResourceName *string + OrderBy string + Offset int32 + Limit int32 } type ListIssuesRow struct { @@ -323,6 +383,7 @@ func (q *Queries) ListIssues(ctx context.Context, arg ListIssuesParams) ([]*List arg.Severity, arg.ResourceType, arg.ResourceName, + arg.LegacyResourceName, arg.OrderBy, arg.Offset, arg.Limit, diff --git a/internal/issue/issuesql/querier.go b/internal/issue/issuesql/querier.go index 96a86d9bb..4ac99ad8b 100644 --- a/internal/issue/issuesql/querier.go +++ b/internal/issue/issuesql/querier.go @@ -9,6 +9,8 @@ import ( ) type Querier interface { + // Normalize before grouping, including zero-count facets. Keep ListIssues' stored + // row types intact so legacy physical names still reach the Postgres read adapter. FacetsForIssues(ctx context.Context, arg FacetsForIssuesParams) ([]*FacetsForIssuesRow, error) GetIssueByID(ctx context.Context, id uuid.UUID) (*Issue, error) GetSeverityScoreForWorkload(ctx context.Context, arg GetSeverityScoreForWorkloadParams) (int64, error) diff --git a/internal/issue/legacy_postgres.go b/internal/issue/legacy_postgres.go new file mode 100644 index 000000000..0e03e4fde --- /dev/null +++ b/internal/issue/legacy_postgres.go @@ -0,0 +1,13 @@ +package issue + +import nais_io_v1 "github.com/nais/pgrator/pkg/api/v1" + +// Old issue snapshots key Postgres by its physical main identity. SQL only uses +// this alternative for stored POSTGRES_BRANCH rows; canonical rows and other +// resource kinds continue to match their logical resource name normally. +func legacyPostgresIssueName(name *string) *string { + if name == nil { + return nil + } + return new(nais_io_v1.PostgresPhysicalName(*name)) +} diff --git a/internal/issue/queries.go b/internal/issue/queries.go index 45a0cf2c9..6a8d84a7f 100644 --- a/internal/issue/queries.go +++ b/internal/issue/queries.go @@ -92,6 +92,7 @@ func listIssues(ctx context.Context, teamSlug slug.Slug, page *pagination.Pagina } } + params.LegacyResourceName = legacyPostgresIssueName(params.ResourceName) ret, err := db(ctx).ListIssues(ctx, params) if err != nil { return nil, err diff --git a/internal/issue/queries/issue.sql b/internal/issue/queries/issue.sql index ae91fc45f..766ef04d2 100644 --- a/internal/issue/queries/issue.sql +++ b/internal/issue/queries/issue.sql @@ -47,7 +47,10 @@ WHERE ) AND ( sqlc.narg('issue_type')::TEXT IS NULL - OR issue_type = sqlc.narg('issue_type')::TEXT + OR CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END = sqlc.narg('issue_type')::TEXT ) AND ( sqlc.narg('severity')::severity_level IS NULL @@ -55,11 +58,18 @@ WHERE ) AND ( sqlc.narg('resource_type')::TEXT IS NULL - OR resource_type = sqlc.narg('resource_type')::TEXT + OR CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END = sqlc.narg('resource_type')::TEXT ) AND ( sqlc.narg('resource_name')::TEXT IS NULL OR resource_name = sqlc.narg('resource_name')::TEXT + OR ( + resource_type = 'POSTGRES_BRANCH' + AND resource_name = sqlc.narg('legacy_resource_name')::TEXT + ) ) ORDER BY CASE @@ -69,16 +79,28 @@ ORDER BY WHEN @order_by::TEXT = 'env:desc' THEN env END DESC, CASE - WHEN @order_by::TEXT = 'issue_type:asc' THEN issue_type + WHEN @order_by::TEXT = 'issue_type:asc' THEN CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END END ASC, CASE - WHEN @order_by::TEXT = 'issue_type:desc' THEN issue_type + WHEN @order_by::TEXT = 'issue_type:desc' THEN CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END END DESC, CASE - WHEN @order_by::TEXT = 'resource_type:asc' THEN resource_type + WHEN @order_by::TEXT = 'resource_type:asc' THEN CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END END ASC, CASE - WHEN @order_by::TEXT = 'resource_type:desc' THEN resource_type + WHEN @order_by::TEXT = 'resource_type:desc' THEN CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END END DESC, CASE WHEN @order_by::TEXT = 'resource_name:asc' THEN resource_name @@ -101,6 +123,31 @@ LIMIT ; -- name: FacetsForIssues :many +-- Normalize before grouping, including zero-count facets. Keep ListIssues' stored +-- row types intact so legacy physical names still reach the Postgres read adapter. +WITH + issue_rows AS ( + SELECT + team, + severity, + env, + resource_name, + ( + CASE + WHEN resource_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE resource_type + END + )::TEXT AS resource_type, + ( + CASE + WHEN issue_type = 'POSTGRES_BRANCH' THEN 'POSTGRES' + ELSE issue_type + END + )::TEXT AS issue_type, + resource_type = 'POSTGRES_BRANCH' AS legacy_postgres + FROM + issues + ) SELECT team, EXISTS ( @@ -136,10 +183,14 @@ SELECT AND ( sqlc.narg('filter_resource_name')::TEXT IS NULL OR resource_name = sqlc.narg('filter_resource_name')::TEXT + OR ( + legacy_postgres + AND resource_name = sqlc.narg('legacy_filter_resource_name')::TEXT + ) ) ) AS filtered_count FROM - issues + issue_rows AS issues WHERE ( @team::TEXT = '' @@ -156,6 +207,10 @@ WHERE AND ( sqlc.narg('scope_resource_name')::TEXT IS NULL OR resource_name = sqlc.narg('scope_resource_name')::TEXT + OR ( + legacy_postgres + AND resource_name = sqlc.narg('legacy_scope_resource_name')::TEXT + ) ) AND ( sqlc.narg('scope_env')::TEXT IS NULL