Skip to content

Commit

Permalink
feat(service): add mutations for relations (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
MR2011 authored Jul 12, 2024
1 parent 0551d0f commit 295d4c7
Show file tree
Hide file tree
Showing 33 changed files with 3,449 additions and 165 deletions.
1,175 changes: 1,048 additions & 127 deletions internal/api/graphql/graph/generated.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($activityId: ID!, $serviceId: ID!) {
addServiceToActivity (
activityId: $activityId,
serviceId: $serviceId
) {
id
services {
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($activityId: ID!, $serviceId: ID!) {
removeServiceFromActivity (
serviceId: $serviceId,
activityId: $activityId
) {
id
services {
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($serviceId: ID!, $issueRepositoryId: ID!, $priority: Int!) {
addIssueRepositoryToService (
serviceId: $serviceId,
issueRepositoryId: $issueRepositoryId,
priority: $priority
) {
id
name
issueRepositories {
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($serviceId: ID!, $userId: ID!) {
addOwnerToService (
serviceId: $serviceId,
userId: $userId
) {
id
name
owners {
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($serviceId: ID!, $issueRepositoryId: ID!) {
removeIssueRepositoryFromService (
serviceId: $serviceId,
issueRepositoryId: $issueRepositoryId
) {
id
name
issueRepositories {
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($serviceId: ID!, $userId: ID!) {
removeOwnerFromService (
serviceId: $serviceId,
userId: $userId
) {
id
name
owners{
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($supportGroupId: ID!, $serviceId: ID!) {
addServiceToSupportGroup (
supportGroupId: $supportGroupId,
serviceId: $serviceId
) {
id
name
services {
edges {
node {
id
name
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
# SPDX-License-Identifier: Apache-2.0

mutation ($supportGroupId: ID!, $serviceId: ID!) {
removeServiceFromSupportGroup (
serviceId: $serviceId,
supportGroupId: $supportGroupId
) {
id
name
services {
edges {
node {
id
name
}
}
}
}
}
176 changes: 176 additions & 0 deletions internal/api/graphql/graph/resolver/mutation.go

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

8 changes: 8 additions & 0 deletions internal/api/graphql/graph/schema/mutation.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ type Mutation {
createSupportGroup(input: SupportGroupInput!): SupportGroup!
updateSupportGroup(id: ID!, input: SupportGroupInput!): SupportGroup!
deleteSupportGroup(id: ID!): String!
addServiceToSupportGroup(supportGroupId: ID!, serviceId: ID!): SupportGroup!
removeServiceFromSupportGroup(supportGroupId: ID!, serviceId: ID!): SupportGroup!

createComponent(input: ComponentInput!): Component!
updateComponent(id: ID!, input: ComponentInput!): Component!
Expand All @@ -25,6 +27,10 @@ type Mutation {
createService(input: ServiceInput!): Service!
updateService(id: ID!, input: ServiceInput!): Service!
deleteService(id: ID!): String!
addOwnerToService(serviceId: ID!, userId: ID!): Service!
removeOwnerFromService(serviceId: ID!, userId: ID!): Service!
addIssueRepositoryToService(serviceId: ID!, issueRepositoryId: ID!, priority: Int!): Service!
removeIssueRepositoryFromService(serviceId: ID!, issueRepositoryId: ID!): Service!

createIssueRepository(input: IssueRepositoryInput!): IssueRepository!
updateIssueRepository(id: ID!, input: IssueRepositoryInput!): IssueRepository!
Expand Down Expand Up @@ -53,4 +59,6 @@ type Mutation {
createActivity(input: ActivityInput!): Activity!
updateActivity(id: ID!, input: ActivityInput!): Activity!
deleteActivity(id: ID!): String!
addServiceToActivity(activityId: ID!, serviceId: ID!): Activity!
removeServiceFromActivity(activityId: ID!, serviceId: ID!): Activity!
}
Loading

0 comments on commit 295d4c7

Please sign in to comment.