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 { fragment RoomParts on RoomNode {
id id
slug slug
@ -6,8 +7,6 @@ fragment RoomParts on RoomNode {
appearance appearance
description description
userGroup { userGroup {
id ...UserGroupParts
name
year
} }
} }

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 { query UserGroupsQuery {
userGroups { userGroups {
edges { edges {
node { node {
id ...UserGroupParts
pk
name
year
isDeleted
} }
} }
} }