Normalize user group in GraphQL queries

This commit is contained in:
Ramon Wenger 2018-09-24 17:03:48 +02:00
parent 9a89fa874b
commit b4a3699aa3
3 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,4 @@
#import "./userGroupParts.gql"
fragment RoomParts on RoomNode {
id
slug
@ -6,8 +7,6 @@ fragment RoomParts on RoomNode {
appearance
description
userGroup {
id
name
year
...UserGroupParts
}
}

View File

@ -0,0 +1,5 @@
fragment UserGroupParts on UserGroupNode {
id
name
year
}

View File

@ -1,12 +1,9 @@
#import "./fragments/userGroupParts.gql"
query UserGroupsQuery {
userGroups {
edges {
node {
id
pk
name
year
isDeleted
...UserGroupParts
}
}
}