mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
- by pushing to the post.comments array, which updates the array, but doesn't rerender the comments component - by updating the apollo store as seen here https://akryum.github.io/vue-apollo/guide/apollo/mutations.html#server-side-example and https://github.com/Akryum/vue-apollo-todos
67 lines
973 B
GraphQL
67 lines
973 B
GraphQL
query Post($slug: String!) {
|
|
Post(slug: $slug) {
|
|
id
|
|
title
|
|
content
|
|
createdAt
|
|
disabled
|
|
deleted
|
|
slug
|
|
image
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar
|
|
disabled
|
|
deleted
|
|
shoutedCount
|
|
contributionsCount
|
|
commentsCount
|
|
followedByCount
|
|
followedByCurrentUser
|
|
badges {
|
|
id
|
|
key
|
|
icon
|
|
}
|
|
}
|
|
tags {
|
|
name
|
|
}
|
|
commentsCount
|
|
comments(orderBy: createdAt_desc) {
|
|
id
|
|
contentExcerpt
|
|
createdAt
|
|
disabled
|
|
deleted
|
|
author {
|
|
id
|
|
slug
|
|
name
|
|
avatar
|
|
disabled
|
|
deleted
|
|
shoutedCount
|
|
contributionsCount
|
|
commentsCount
|
|
followedByCount
|
|
followedByCurrentUser
|
|
badges {
|
|
id
|
|
key
|
|
icon
|
|
}
|
|
}
|
|
}
|
|
categories {
|
|
id
|
|
name
|
|
icon
|
|
}
|
|
shoutedCount
|
|
shoutedByCurrentUser
|
|
}
|
|
}
|