Skip to content

Commit

Permalink
Step 4.7: Add MessageFragment to Group Query
Browse files Browse the repository at this point in the history
  • Loading branch information
srtucker22 authored and Simon Tucker committed Aug 26, 2018
1 parent 4b0db4c commit bc0abef
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions client/src/graphql/group.query.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import gql from 'graphql-tag';

import MESSAGE_FRAGMENT from './message.fragment';

const GROUP_QUERY = gql`
query group($groupId: Int!) {
group(id: $groupId) {
Expand All @@ -10,16 +12,11 @@ const GROUP_QUERY = gql`
username
}
messages {
id
from {
id
username
}
createdAt
text
... MessageFragment
}
}
}
${MESSAGE_FRAGMENT}
`;

export default GROUP_QUERY;

0 comments on commit bc0abef

Please sign in to comment.