Skip to content

Commit

Permalink
removed node references
Browse files Browse the repository at this point in the history
  • Loading branch information
sschottler committed Jan 14, 2019
1 parent 384f1ec commit 2998601
Showing 1 changed file with 26 additions and 30 deletions.
56 changes: 26 additions & 30 deletions src/components/LinkList.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,18 @@ export const FEED_QUERY = gql`
const NEW_LINKS_SUBSCRIPTION = gql`
subscription {
newLink {
node {
id
url
description
createdAt
postedBy {
id
url
description
createdAt
postedBy {
id
name
}
votes {
name
}
votes {
id
user {
id
user {
id
}
}
}
}
Expand All @@ -54,28 +52,26 @@ const NEW_LINKS_SUBSCRIPTION = gql`
const NEW_VOTES_SUBSCRIPTION = gql`
subscription {
newVote {
node {
id
link {
id
link {
url
description
createdAt
postedBy {
id
url
description
createdAt
postedBy {
id
name
}
votes {
id
user {
id
}
}
name
}
user {
votes {
id
user {
id
}
}
}
user {
id
}
}
}
`
Expand Down Expand Up @@ -103,7 +99,7 @@ class LinkList extends Component {
document: NEW_LINKS_SUBSCRIPTION,
updateQuery: (prev, { subscriptionData }) => {
if (!subscriptionData.data) return prev
const newLink = subscriptionData.data.newLink.node
const newLink = subscriptionData.data.newLink

return Object.assign({}, prev, {
feed: {
Expand Down Expand Up @@ -202,4 +198,4 @@ class LinkList extends Component {
}
}

export default LinkList
export default LinkList

0 comments on commit 2998601

Please sign in to comment.