Review/systems and deployments api#58
Conversation
WalkthroughAdds DORA domain: Applications, Environments, Deployments, Incidents, and DeployedPullRequests across DB schema, Prisma models, services, validators, and GraphQL types/resolvers. Refactors authorization to member-scoped checks. Expands filtering in People/Teams/Repositories. Introduces transformers and validation utilities. Updates GraphQL SDL, frontend typed documents, and several minor refactors. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120–180 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 18
🧹 Nitpick comments (15)
apps/api/src/app/digests/services/digest-team-wip.service.ts (1)
79-79: Verify frontend routes for new/humans/teamsURLs.
Ensure the frontend exposes these routes to prevent 404s when Slack buttons are clicked:
/humans/teams/:id/humans/teams/:id/digests/wipOptional: extract a URL‐builder utility to replace duplicated template literals in both digest‐wip and digest‐metrics services.
apps/api/src/app/repositories/resolvers/queries/repositories.query.ts (1)
20-20: LGTM! Filtering by repository IDs added.The new
repositoriesIdsparameter enables filtering repositories by a set of IDs, consistent with the existing parameter handling pattern.Optionally, you could simplify to
repositoriesIds: input?.ids,since the optional chaining already returnsundefinedwheninputis nullish. However, keeping|| undefinedmaintains consistency with the existing code style on lines 21-22.apps/api/src/app/people/resolvers/queries/people.query.ts (1)
20-20: LGTM! Git profile ID filtering added.The new
gitProfileIdsparameter enables filtering people by specific git profile IDs, following the same pattern as the repositories query.Similar to the repositories query, you could simplify to
gitProfileIds: input?.ids,since optional chaining handles the undefined case. However,|| undefinedmaintains consistency with lines 21-23.apps/api/src/app/teams/resolvers/queries/teams.query.ts (1)
31-31: Consider simplifying the undefined fallback.The
|| undefinedis redundant sinceinput?.idsalready returnsundefinedwhen nullish. You can simplify to justinput?.ids.Apply this diff to simplify:
- teamIds: input?.ids || undefined, + teamIds: input?.ids,apps/api/src/app/repositories/resolvers/queries/application-repository.query.ts (1)
20-23: Type assertions bypass compile-time safety.Using bracket notation and type assertions (
as number) to accessrepositoryIdindicates this property exists in the database model but not in the public GraphQL type. While this pattern works, it's fragile and could break if the database schema changes.Consider creating an internal type that extends the public API type to document these hidden fields:
type ApplicationWithInternals = Application & { repositoryId: number; workspaceId: number; }; export const applicationRepositoryQuery = createFieldResolver("Application", { repository: async (application: ApplicationWithInternals, _, context) => { // ... repositoryId: application.repositoryId, // ... }, });apps/api/src/app/environments/resolvers/query/environments.query.ts (1)
18-24: Simplify optional parameter handling.The pattern
input.ids || undefinedis redundant becausepaginateEnvironmentsalready handles undefined and empty arrays correctly. Additionally, using||with arrays can have unexpected behavior (empty array[]becomesundefined).Consider passing values directly for clarity:
const environments = await paginateEnvironments(workspace.id, { - environmentIds: input.ids || undefined, - query: input.query || undefined, - cursor: input.cursor || undefined, - limit: input.limit || undefined, - includeArchived: input.includeArchived || undefined, + environmentIds: input.ids ?? undefined, + query: input.query ?? undefined, + cursor: input.cursor ?? undefined, + limit: input.limit ?? undefined, + includeArchived: input.includeArchived ?? undefined, });Or, if the service handles nullish values correctly, pass them directly:
const environments = await paginateEnvironments(workspace.id, { - environmentIds: input.ids || undefined, - query: input.query || undefined, - cursor: input.cursor || undefined, - limit: input.limit || undefined, - includeArchived: input.includeArchived || undefined, + environmentIds: input.ids, + query: input.query, + cursor: input.cursor, + limit: input.limit, + includeArchived: input.includeArchived, });apps/api/src/app/teams/services/team.validation.ts (1)
9-9: BindworkspaceIdto the scoped workspace.Because this schema is already parameterized with the trusted workspace id, accepting an arbitrary numeric
workspaceIdfrom the payload opens the door for mismatched or forged workspace writes if downstream code relies on the parsed value. Replace the field withz.literal(workspaceId)(or drop it entirely and inject the trusted value later) so callers can’t smuggle operations into another workspace.apps/api/src/app/applications/services/application.validation.ts (1)
8-8: LockworkspaceIdto the caller’s scope.For the same reason as in the team schema, this workspace-scoped validator shouldn’t let the client provide an arbitrary
workspaceId. Swapz.number()forz.literal(workspaceId)(or remove the field and inject the trusted id later) to prevent callers from steering operations into a different workspace.apps/api/src/app/deployment/resolvers/queries/deployments.query.ts (3)
15-17: Improve error specificity.The code checks both
workspace.idandinput, but the error message only mentions "Workspace not found". This could be confusing when the actual issue is missing input.Apply this diff for clearer error messages:
- if (!workspace.id || !input) { + if (!workspace.id) { throw new ResourceNotFoundException("Workspace not found"); } + + if (!input) { + throw new ResourceNotFoundException("Query input is required"); + }
21-32: Remove redundant|| undefinedpatterns.The code uses
|| undefinedfor already-optional fields. This is redundant becauseinput.idsis alreadyundefinedif not provided.Simplify to:
const deployments = await paginateDeployments(workspace.id, { - deploymentIds: input.ids || undefined, - query: input.query || undefined, + deploymentIds: input.ids, + query: input.query, deployedAt: { - from: input.deployedAt?.from || undefined, - to: input.deployedAt?.to || undefined, + from: input.deployedAt?.from, + to: input.deployedAt?.to, }, - applicationIds: input.applicationIds || undefined, - environmentIds: input.environmentIds || undefined, - cursor: input.cursor || undefined, - limit: input.limit || undefined, + applicationIds: input.applicationIds, + environmentIds: input.environmentIds, + cursor: input.cursor, + limit: input.limit, });
39-41: Same error specificity issue.As with the
deploymentsresolver, the error check and message don't align.Apply this diff:
- if (!workspace.id || !deploymentId) { + if (!workspace.id) { throw new ResourceNotFoundException("Workspace not found"); } + + if (!deploymentId) { + throw new ResourceNotFoundException("Deployment ID is required"); + }apps/api/src/app/incidents/services/incident.validation.ts (1)
16-20: Consider simplifying.optional().nullable()to just.optional().Several fields use both
.optional()and.nullable(), creating a union type ofT | undefined | null. Unless your API semantically distinguishes betweennull(explicitly cleared) andundefined(not provided), this adds unnecessary complexity.If
nullandundefinedare treated the same, simplify to:- fixDeploymentId: deploymentValidator(workspaceId).optional().nullable(), - leaderId: workspaceMemberValidator(workspaceId).optional().nullable(), - teamId: teamValidator(workspaceId).optional().nullable(), - postmortemUrl: z.string().max(URL_INPUT_MAX_LENGTH).optional().nullable(), - resolvedAt: z.date().optional().nullable(), + fixDeploymentId: deploymentValidator(workspaceId).optional(), + leaderId: workspaceMemberValidator(workspaceId).optional(), + teamId: teamValidator(workspaceId).optional(), + postmortemUrl: z.string().max(URL_INPUT_MAX_LENGTH).optional(), + resolvedAt: z.date().optional(),apps/api/src/app/applications/resolvers/queries/deployment-application.query.ts (2)
29-31: Data integrity check should be logged, not just thrown.If a deployment has an
applicationIdbut the application isn't found, this suggests a data integrity issue (orphaned deployment). Consider logging this scenario for monitoring purposes before throwing.if (!application) { + logger.error("Data integrity issue: deployment references non-existent application", { + deploymentId: deployment.id, + applicationId: deployment["applicationId"], + workspaceId: deployment["workspaceId"], + }); throw new ResourceNotFoundException("Application not found"); }
12-22: Use consistent property access and consolidate validation
- Destructure
id,workspaceId, andapplicationIdfromdeploymentand use dot notation instead ofdeployment["…"].- (Optional) Extract or combine the null checks into a single guard or helper to reduce repetition and clarify intent.
apps/api/src/app/incidents/services/incident.service.ts (1)
82-84: RedundantworkspaceIdin update clause.The
workspaceIdis already included in the validateddataobject (Line 69-72) and should be immutable for existing records. Including it in theupdateclause is redundant.Consider removing
workspaceIdfrom the update clause:update: { ...data, - workspaceId, },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (90)
apps/api/prisma/migrations/20250911021019_create_dora_tables/migration.sql(1 hunks)apps/api/prisma/schema.prisma(7 hunks)apps/api/src/app/alerts/resolvers/alerts.schema.ts(1 hunks)apps/api/src/app/alerts/resolvers/mutations/update-alert.mutation.ts(2 hunks)apps/api/src/app/alerts/services/alert-merged-without-approval.service.ts(1 hunks)apps/api/src/app/alerts/services/alert-schedule.service.ts(1 hunks)apps/api/src/app/api-keys/resolvers/api-keys.schema.ts(1 hunks)apps/api/src/app/api-keys/resolvers/mutations/api-keys.mutation.ts(1 hunks)apps/api/src/app/applications/resolvers/applications.schema.ts(1 hunks)apps/api/src/app/applications/resolvers/mutations/upsert-application.mutation.ts(1 hunks)apps/api/src/app/applications/resolvers/queries/applications.query.ts(1 hunks)apps/api/src/app/applications/resolvers/queries/deployment-application.query.ts(1 hunks)apps/api/src/app/applications/resolvers/transformers/application.transformer.ts(1 hunks)apps/api/src/app/applications/services/application.service.ts(1 hunks)apps/api/src/app/applications/services/application.types.ts(1 hunks)apps/api/src/app/applications/services/application.validation.ts(1 hunks)apps/api/src/app/auth/services/auth.service.ts(1 hunks)apps/api/src/app/authorization.service.ts(1 hunks)apps/api/src/app/automations/resolvers/automations.schema.ts(1 hunks)apps/api/src/app/automations/resolvers/mutations/update-automation.mutation.ts(1 hunks)apps/api/src/app/automations/services/automation.service.ts(1 hunks)apps/api/src/app/automations/sweets/pr-title-check/pr-title-check.service.ts(1 hunks)apps/api/src/app/billing/resolvers/queries/is-active-customer.query.ts(1 hunks)apps/api/src/app/billing/services/billing.service.ts(1 hunks)apps/api/src/app/code-reviews/resolvers/transformers/code-review.transformer.ts(1 hunks)apps/api/src/app/deployment/resolvers/deployments.schema.ts(1 hunks)apps/api/src/app/deployment/resolvers/queries/application-deployment.query.ts(1 hunks)apps/api/src/app/deployment/resolvers/queries/deployments.query.ts(1 hunks)apps/api/src/app/deployment/resolvers/queries/incident-deployments.query.ts(1 hunks)apps/api/src/app/deployment/resolvers/transformers/deployment.transformer.ts(1 hunks)apps/api/src/app/deployment/services/deployment.service.ts(1 hunks)apps/api/src/app/deployment/services/deployment.types.ts(1 hunks)apps/api/src/app/digests/resolvers/digests.schema.ts(1 hunks)apps/api/src/app/digests/resolvers/mutations/update-digest.mutation.ts(2 hunks)apps/api/src/app/digests/services/digest-schedule.service.ts(1 hunks)apps/api/src/app/digests/services/digest-team-metrics.service.ts(1 hunks)apps/api/src/app/digests/services/digest-team-wip.service.ts(1 hunks)apps/api/src/app/environments/resolvers/environments.schema.ts(1 hunks)apps/api/src/app/environments/resolvers/mutations/archive-environment.mutation.ts(1 hunks)apps/api/src/app/environments/resolvers/query/deployment-environment.query.ts(1 hunks)apps/api/src/app/environments/resolvers/query/environments.query.ts(1 hunks)apps/api/src/app/environments/resolvers/transformers/environment.transformer.ts(1 hunks)apps/api/src/app/environments/services/environment.service.ts(1 hunks)apps/api/src/app/environments/services/environment.types.ts(1 hunks)apps/api/src/app/github/services/github-code-review.service.ts(1 hunks)apps/api/src/app/incidents/resolvers/incidents.schema.ts(1 hunks)apps/api/src/app/incidents/resolvers/mutations/upsert-incident.mutation.ts(1 hunks)apps/api/src/app/incidents/resolvers/queries/incidents.query.ts(1 hunks)apps/api/src/app/incidents/resolvers/transformers/incident.transformer.ts(1 hunks)apps/api/src/app/incidents/services/incident.service.ts(1 hunks)apps/api/src/app/incidents/services/incident.types.ts(1 hunks)apps/api/src/app/incidents/services/incident.validation.ts(1 hunks)apps/api/src/app/integrations/resolvers/mutations/install-integration.mutation.ts(2 hunks)apps/api/src/app/integrations/resolvers/mutations/remove-integration.mutation.ts(1 hunks)apps/api/src/app/integrations/resolvers/mutations/send-test-message.mutation.ts(2 hunks)apps/api/src/app/integrations/slack/services/slack-integration.service.ts(1 hunks)apps/api/src/app/people/resolvers/people.schema.ts(1 hunks)apps/api/src/app/people/resolvers/queries/deployment-author.query.ts(1 hunks)apps/api/src/app/people/resolvers/queries/incident-leader.query.ts(1 hunks)apps/api/src/app/people/resolvers/queries/people.query.ts(1 hunks)apps/api/src/app/people/services/people.service.ts(1 hunks)apps/api/src/app/people/services/people.types.ts(1 hunks)apps/api/src/app/pull-requests/resolvers/pull-requests.schema.ts(1 hunks)apps/api/src/app/pull-requests/resolvers/queries/deployment-pull-requests.query.ts(1 hunks)apps/api/src/app/pull-requests/resolvers/transformers/pull-request.transformer.ts(1 hunks)apps/api/src/app/pull-requests/services/pull-request.service.ts(3 hunks)apps/api/src/app/pull-requests/services/pull-request.types.ts(2 hunks)apps/api/src/app/repositories/resolvers/queries/application-repository.query.ts(1 hunks)apps/api/src/app/repositories/resolvers/queries/pull-request-repository.query.ts(1 hunks)apps/api/src/app/repositories/resolvers/queries/repositories.query.ts(1 hunks)apps/api/src/app/repositories/resolvers/repositories.schema.ts(1 hunks)apps/api/src/app/repositories/services/repository.service.ts(2 hunks)apps/api/src/app/repositories/services/repository.types.ts(1 hunks)apps/api/src/app/sync-batch/services/sync-batch.types.ts(1 hunks)apps/api/src/app/sync-batch/workers/sync-batch.worker.ts(1 hunks)apps/api/src/app/teams/resolvers/mutations/upsert-team.mutation.ts(1 hunks)apps/api/src/app/teams/resolvers/queries/application-team.query.ts(1 hunks)apps/api/src/app/teams/resolvers/queries/incident-team.query.ts(1 hunks)apps/api/src/app/teams/resolvers/queries/teams.query.ts(1 hunks)apps/api/src/app/teams/resolvers/teams.schema.ts(1 hunks)apps/api/src/app/teams/services/team.service.ts(6 hunks)apps/api/src/app/teams/services/team.types.ts(2 hunks)apps/api/src/app/teams/services/team.validation.ts(1 hunks)apps/api/src/app/types.ts(1 hunks)apps/api/src/app/validator.service.ts(1 hunks)apps/api/src/app/workspaces/resolvers/mutations/update-workspace-settings.mutation.ts(1 hunks)apps/api/src/app/workspaces/services/workspace.service.ts(0 hunks)apps/api/src/lib/validate-input.ts(1 hunks)packages/graphql-types/api.ts(28 hunks)packages/graphql-types/frontend/gql.ts(7 hunks)
💤 Files with no reviewable changes (1)
- apps/api/src/app/workspaces/services/workspace.service.ts
🧰 Additional context used
🧬 Code graph analysis (48)
apps/api/src/app/environments/resolvers/query/deployment-environment.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Deployment(257-278)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/environments/services/environment.service.ts (1)
findEnvironmentById(10-20)apps/api/src/app/environments/resolvers/transformers/environment.transformer.ts (1)
transformEnvironment(4-11)
apps/api/src/app/applications/resolvers/mutations/upsert-application.mutation.ts (6)
apps/api/src/lib/graphql.ts (1)
createMutationResolver(11-19)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/applications/services/application.service.ts (1)
upsertApplication(82-123)apps/api/src/app/applications/resolvers/transformers/application.transformer.ts (1)
transformApplication(7-15)
apps/api/src/app/people/resolvers/queries/incident-leader.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Incident(376-395)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/people/services/people.service.ts (1)
findGitProfileById(75-87)apps/api/src/app/people/resolvers/transformers/people.transformer.ts (1)
transformPerson(4-17)
apps/api/src/app/deployment/resolvers/queries/application-deployment.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Application(66-84)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/deployment/services/deployment.service.ts (1)
findLastProductionDeploymentByApplicationId(98-113)apps/api/src/app/deployment/resolvers/transformers/deployment.transformer.ts (1)
transformDeployment(4-15)
apps/api/src/app/incidents/resolvers/queries/incidents.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/incidents/services/incident.service.ts (2)
paginateIncidents(20-64)findIncidentById(11-18)apps/api/src/app/incidents/resolvers/transformers/incident.transformer.ts (1)
transformIncident(4-16)
apps/api/src/app/deployment/resolvers/transformers/deployment.transformer.ts (1)
packages/graphql-types/api.ts (1)
Omit(11-11)
apps/api/src/app/teams/resolvers/queries/incident-team.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Incident(376-395)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/teams/services/team.service.ts (1)
findTeamById(13-23)apps/api/src/app/teams/resolvers/transformers/team.transformer.ts (1)
transformTeam(4-21)
apps/api/src/app/repositories/resolvers/queries/pull-request-repository.query.ts (1)
apps/api/src/app/repositories/services/repository.service.ts (1)
findRepositoryById(9-19)
apps/api/src/app/digests/resolvers/mutations/update-digest.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/environments/resolvers/mutations/archive-environment.mutation.ts (5)
apps/api/src/lib/graphql.ts (1)
createMutationResolver(11-19)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/environments/services/environment.service.ts (2)
archiveEnvironment(59-67)unarchiveEnvironment(69-77)apps/api/src/app/environments/resolvers/transformers/environment.transformer.ts (1)
transformEnvironment(4-11)
apps/api/src/app/applications/resolvers/transformers/application.transformer.ts (2)
packages/graphql-types/api.ts (2)
Omit(11-11)DeploymentSettings(280-286)apps/api/src/app/applications/services/application.types.ts (1)
DeploymentSettings(22-25)
apps/api/src/app/people/resolvers/queries/deployment-author.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Deployment(257-278)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/people/services/people.service.ts (1)
findGitProfileById(75-87)apps/api/src/app/people/resolvers/transformers/people.transformer.ts (1)
transformPerson(4-17)
apps/api/src/app/applications/services/application.validation.ts (2)
apps/api/src/lib/validate-input.ts (1)
STRING_INPUT_MAX_LENGTH(4-4)apps/api/src/app/validator.service.ts (2)
repositoryValidator(66-73)teamValidator(57-64)
apps/api/src/app/environments/resolvers/query/environments.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/environments/services/environment.service.ts (1)
paginateEnvironments(22-57)apps/api/src/app/environments/resolvers/transformers/environment.transformer.ts (1)
transformEnvironment(4-11)
apps/api/src/app/incidents/services/incident.types.ts (2)
apps/api/src/app/types.ts (1)
DateTimeRange(1-4)packages/graphql-types/api.ts (2)
DateTimeRange(240-245)UpsertIncidentInput(942-961)
apps/api/src/app/applications/services/application.types.ts (2)
packages/graphql-types/api.ts (2)
DeploymentSettings(280-286)UpsertApplicationInput(925-940)packages/graphql-types/frontend/graphql.ts (2)
DeploymentSettings(277-283)UpsertApplicationInput(922-937)
apps/api/src/app/deployment/resolvers/queries/deployments.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/deployment/services/deployment.service.ts (2)
paginateDeployments(35-96)findDeploymentById(10-20)apps/api/src/app/deployment/resolvers/transformers/deployment.transformer.ts (1)
transformDeployment(4-15)
apps/api/src/app/automations/resolvers/mutations/update-automation.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/integrations/resolvers/mutations/send-test-message.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/digests/services/digest-team-wip.service.ts (1)
apps/api/src/env.ts (1)
env(6-133)
apps/api/src/app/deployment/resolvers/queries/incident-deployments.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Incident(376-395)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/deployment/services/deployment.service.ts (1)
findDeploymentById(10-20)apps/api/src/app/deployment/resolvers/transformers/deployment.transformer.ts (1)
transformDeployment(4-15)
apps/api/src/app/incidents/services/incident.validation.ts (2)
apps/api/src/app/validator.service.ts (3)
deploymentValidator(39-46)workspaceMemberValidator(27-37)teamValidator(57-64)apps/api/src/lib/validate-input.ts (1)
URL_INPUT_MAX_LENGTH(5-5)
apps/api/src/app/applications/resolvers/queries/applications.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/applications/services/application.service.ts (2)
paginateApplications(39-80)findApplicationById(14-24)apps/api/src/app/applications/resolvers/transformers/application.transformer.ts (1)
transformApplication(7-15)
apps/api/src/app/deployment/services/deployment.service.ts (2)
apps/api/src/app/deployment/services/deployment.types.ts (3)
FindDeploymentByIdArgs(13-16)PaginateDeploymentsArgs(3-11)FindLastProductionDeploymentByApplicationIdArgs(18-21)apps/api/src/prisma.ts (2)
getPrisma(23-49)take(51-53)
apps/api/src/app/applications/resolvers/queries/deployment-application.query.ts (4)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Deployment(257-278)apps/api/src/app/applications/services/application.service.ts (1)
findApplicationById(14-24)apps/api/src/app/applications/resolvers/transformers/application.transformer.ts (1)
transformApplication(7-15)
apps/api/src/app/incidents/resolvers/transformers/incident.transformer.ts (1)
packages/graphql-types/api.ts (1)
Omit(11-11)
apps/api/src/app/environments/services/environment.service.ts (2)
apps/api/src/app/environments/services/environment.types.ts (4)
FindEnvironmentByIdArgs(1-4)PaginateEnvironmentsArgs(6-12)ArchiveEnvironmentArgs(14-17)UnarchiveEnvironmentArgs(19-22)apps/api/src/prisma.ts (2)
getPrisma(23-49)take(51-53)
apps/api/src/app/pull-requests/resolvers/queries/deployment-pull-requests.query.ts (4)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/pull-requests/services/pull-request.service.ts (2)
findPullRequestsByDeploymentId(207-223)countPullRequestsByDeploymentId(225-232)apps/api/src/app/pull-requests/resolvers/transformers/pull-request.transformer.ts (1)
transformPullRequest(7-17)
apps/api/src/app/teams/resolvers/mutations/upsert-team.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/teams/resolvers/queries/application-team.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Application(66-84)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/teams/services/team.service.ts (1)
findTeamById(13-23)apps/api/src/app/teams/resolvers/transformers/team.transformer.ts (1)
transformTeam(4-21)
apps/api/src/app/incidents/resolvers/mutations/upsert-incident.mutation.ts (6)
apps/api/src/lib/graphql.ts (1)
createMutationResolver(11-19)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)apps/api/src/app/billing/services/billing.service.ts (1)
protectWithPaywall(141-155)apps/api/src/app/incidents/services/incident.service.ts (1)
upsertIncident(66-87)apps/api/src/app/incidents/resolvers/transformers/incident.transformer.ts (1)
transformIncident(4-16)
apps/api/src/app/deployment/services/deployment.types.ts (1)
apps/api/src/app/types.ts (1)
DateTimeRange(1-4)
apps/api/src/app/repositories/services/repository.service.ts (2)
apps/api/src/app/repositories/services/repository.types.ts (1)
FindRepositoryByIdArgs(1-4)apps/api/src/prisma.ts (1)
getPrisma(23-49)
apps/api/src/app/digests/services/digest-team-metrics.service.ts (1)
apps/api/src/env.ts (1)
env(6-133)
apps/api/src/app/teams/services/team.validation.ts (2)
apps/api/src/lib/validate-input.ts (1)
STRING_INPUT_MAX_LENGTH(4-4)apps/api/src/prisma.ts (1)
getPrisma(23-49)
apps/api/src/app/api-keys/resolvers/mutations/api-keys.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/incidents/services/incident.service.ts (4)
apps/api/src/app/incidents/services/incident.types.ts (3)
FindIncidentByIdArgs(3-6)PaginateIncidentsArgs(8-14)UpsertIncidentInput(16-26)apps/api/src/prisma.ts (2)
getPrisma(23-49)take(51-53)apps/api/src/app/validator.service.ts (1)
validateInputOrThrow(9-25)apps/api/src/app/incidents/services/incident.validation.ts (1)
getIncidentValidationSchema(9-21)
apps/api/src/app/teams/services/team.service.ts (3)
apps/api/src/app/teams/services/team.types.ts (3)
FindTeamByIdArgs(3-6)FindTeamsByWorkspaceArgs(27-32)FindTeamMembersArgs(8-11)apps/api/src/app/validator.service.ts (1)
validateInputOrThrow(9-25)apps/api/src/app/teams/services/team.validation.ts (1)
getTeamValidationSchema(7-42)
apps/api/src/app/applications/services/application.service.ts (4)
apps/api/src/app/applications/services/application.types.ts (3)
FindApplicationByIdArgs(3-6)PaginateApplicationsArgs(8-14)UpsertApplicationInput(27-35)apps/api/src/prisma.ts (2)
getPrisma(23-49)take(51-53)apps/api/src/app/validator.service.ts (1)
validateInputOrThrow(9-25)apps/api/src/app/applications/services/application.validation.ts (1)
getApplicationValidationSchema(6-23)
apps/api/src/app/integrations/resolvers/mutations/remove-integration.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/repositories/resolvers/queries/application-repository.query.ts (5)
apps/api/src/lib/graphql.ts (1)
createFieldResolver(21-30)packages/graphql-types/api.ts (1)
Application(66-84)apps/api/src/lib/logger.ts (1)
logger(13-37)apps/api/src/app/repositories/services/repository.service.ts (1)
findRepositoryById(9-19)apps/api/src/app/repositories/resolvers/transformers/repository.transformer.ts (1)
transformRepository(4-12)
apps/api/src/app/workspaces/resolvers/mutations/update-workspace-settings.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/integrations/resolvers/mutations/install-integration.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
apps/api/src/app/authorization.service.ts (1)
apps/api/src/prisma.ts (1)
getPrisma(23-49)
packages/graphql-types/api.ts (4)
packages/graphql-types/frontend/graphql.ts (33)
Application(63-81)Maybe(3-3)Scalars(11-24)DeploymentSettings(277-283)Deployment(254-275)Repository(780-785)Team(798-814)ApplicationsQueryInput(83-94)InputMaybe(4-4)ArchiveEnvironmentInput(96-99)Person(587-598)Environment(342-351)PullRequest(618-647)DeploymentSettingsInput(285-290)DeploymentsQueryInput(299-314)DateTimeRange(237-242)EnvironmentsQueryInput(353-364)Incident(373-392)IncidentsQueryInput(394-405)Automation(124-129)Workspace(977-1010)UnarchiveEnvironmentInput(878-881)UpsertApplicationInput(922-937)UpsertIncidentInput(939-958)Billing(149-156)Charts(174-182)WorkspaceApplicationArgs(1013-1015)WorkspaceApplicationsArgs(1018-1020)WorkspaceDeploymentArgs(1033-1035)WorkspaceDeploymentsArgs(1038-1040)WorkspaceEnvironmentsArgs(1043-1045)WorkspaceIncidentArgs(1048-1050)WorkspaceIncidentsArgs(1053-1055)apps/api/src/app/applications/services/application.types.ts (2)
DeploymentSettings(22-25)UpsertApplicationInput(27-35)apps/api/src/app/incidents/services/incident.types.ts (1)
UpsertIncidentInput(16-26)packages/graphql-types/shared.ts (1)
GraphQLContext(7-27)
apps/api/src/app/validator.service.ts (7)
apps/api/src/lib/validate-input.ts (1)
validateInputOrThrow(7-22)apps/api/src/app/errors/exceptions/input-validation.exception.ts (1)
InputValidationException(11-25)apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)apps/api/src/app/deployment/services/deployment.service.ts (1)
findDeploymentByIdOrThrow(22-33)apps/api/src/app/applications/services/application.service.ts (1)
findApplicationByIdOrThrow(26-37)apps/api/src/app/teams/services/team.service.ts (1)
findTeamByIdOrThrow(25-36)apps/api/src/app/repositories/services/repository.service.ts (1)
findRepositoryByIdOrThrow(21-32)
apps/api/src/app/pull-requests/services/pull-request.service.ts (2)
apps/api/src/app/pull-requests/services/pull-request.types.ts (2)
FindPullRequestsByDeploymentIdArgs(21-24)CountPullRequestsByDeploymentIdArgs(26-29)apps/api/src/prisma.ts (2)
getPrisma(23-49)take(51-53)
apps/api/src/app/alerts/resolvers/mutations/update-alert.mutation.ts (1)
apps/api/src/app/authorization.service.ts (1)
authorizeWorkspaceMemberOrThrow(53-72)
Summary by CodeRabbit