no-created-by-unwrap
This commit is contained in:
parent
449154bd1b
commit
ce66874089
|
@ -30,6 +30,7 @@ import unfollowMutation from '../mutation/core/unfollow'
|
|||
import shoutLoad from '../query/core/article-load'
|
||||
import shoutsLoadBy from '../query/core/articles-load-by'
|
||||
import draftsLoad from '../query/core/articles-load-drafts'
|
||||
import getMyShout from '../query/core/article-my'
|
||||
import myFeed from '../query/core/articles-load-feed'
|
||||
import loadShoutsTopRandom from '../query/core/articles-load-random-top'
|
||||
import articlesLoadRandomTopic from '../query/core/articles-load-random-topic'
|
||||
|
@ -41,7 +42,6 @@ import authorFollows from '../query/core/author-follows'
|
|||
import authorId from '../query/core/author-id'
|
||||
import authorsAll from '../query/core/authors-all'
|
||||
import authorsLoadBy from '../query/core/authors-load-by'
|
||||
import mySubscriptions from '../query/core/my-followed'
|
||||
import reactionsLoadBy from '../query/core/reactions-load-by'
|
||||
import topicBySlug from '../query/core/topic-by-slug'
|
||||
import topicsAll from '../query/core/topics-all'
|
||||
|
@ -206,10 +206,10 @@ export const apiClient = {
|
|||
},
|
||||
|
||||
getMyShout: async (shout_id: number) => {
|
||||
const resp = await apiClient.private.query(shoutLoad, { shout_id }).toPromise()
|
||||
const resp = await apiClient.private.query(getMyShout, { shout_id }).toPromise()
|
||||
if (resp.error) console.error(resp)
|
||||
|
||||
return resp.data.get_shout
|
||||
return resp.data.get_my_shout
|
||||
},
|
||||
|
||||
getShouts: async (options: LoadShoutsOptions) => {
|
||||
|
|
50
src/graphql/query/core/article-my.ts
Normal file
50
src/graphql/query/core/article-my.ts
Normal file
|
@ -0,0 +1,50 @@
|
|||
import { gql } from '@urql/core'
|
||||
|
||||
export default gql`
|
||||
query GetMyShout($shout_id: Int!) {
|
||||
get_my_shout(shout_id: $shout_id) {
|
||||
id
|
||||
title
|
||||
lead
|
||||
description
|
||||
subtitle
|
||||
slug
|
||||
layout
|
||||
cover
|
||||
cover_caption
|
||||
body
|
||||
media
|
||||
updated_by {
|
||||
id
|
||||
name
|
||||
slug
|
||||
pic
|
||||
created_at
|
||||
}
|
||||
# community
|
||||
main_topic
|
||||
topics {
|
||||
id
|
||||
title
|
||||
body
|
||||
slug
|
||||
stat {
|
||||
shouts
|
||||
authors
|
||||
followers
|
||||
}
|
||||
}
|
||||
authors {
|
||||
id
|
||||
name
|
||||
slug
|
||||
pic
|
||||
created_at
|
||||
}
|
||||
created_at
|
||||
updated_at
|
||||
published_at
|
||||
featured_at
|
||||
}
|
||||
}
|
||||
`
|
|
@ -23,13 +23,6 @@ export default gql`
|
|||
followers
|
||||
}
|
||||
}
|
||||
created_by {
|
||||
id
|
||||
name
|
||||
slug
|
||||
pic
|
||||
created_at
|
||||
}
|
||||
authors {
|
||||
id
|
||||
name
|
||||
|
|
Loading…
Reference in New Issue
Block a user