Skip to content

Commit

Permalink
enhancement: Add group queries to client (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm authored Jul 24, 2024
1 parent f735945 commit 18d9180
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 68 deletions.
1 change: 0 additions & 1 deletion go/client/.gitignore

This file was deleted.

76 changes: 17 additions & 59 deletions go/client/client.go

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

11 changes: 3 additions & 8 deletions go/client/graph/users.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ query GetUser($email: String!) {
}
}

query GetGroup($name: String!) {
group(name: $name) {
...GroupFragment
mutation DeleteUser($id: ID!) {
deleteUser(id: $id) {
...UserFragment
}
}

Expand All @@ -22,8 +22,3 @@ mutation DeleteGroupMember($userId: ID!, $groupId: ID!) {
}
}

mutation DeleteUser($id: ID!) {
deleteUser(id: $id) {
...UserFragment
}
}
2 changes: 2 additions & 0 deletions go/client/graphql.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: ../../schema/schema.graphql
documents: '**/*.graphql'
23 changes: 23 additions & 0 deletions go/client/groups.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
query GetGroup($name: String!) {
group(name: $name) {
...GroupFragment
}
}

mutation CreateGroup($attributtes: GroupAttributes!) {
createGroup(attributes: $attributtes) {
...GroupFragment
}
}

mutation UpdateGroup($groupId: ID!, $attributtes: GroupAttributes!) {
updateGroup(groupId: $groupId, attributes: $attributtes) {
...GroupFragment
}
}

mutation DeleteGroup($groupId: ID!) {
deleteGroup(groupId: $groupId) {
...GroupFragment
}
}

0 comments on commit 18d9180

Please sign in to comment.