new gqls
This commit is contained in:
parent
5839e247b1
commit
cd6ecce305
28
src/graphql/mutation/article-from-draft.ts
Normal file
28
src/graphql/mutation/article-from-draft.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { gql } from '@urql/core'
|
||||
|
||||
export default gql`
|
||||
mutation ShoutFromDraftMutation($draft: Int!) {
|
||||
draftToShout(draft: $draft) {
|
||||
error
|
||||
shout {
|
||||
_id: slug
|
||||
slug
|
||||
title
|
||||
subtitle
|
||||
body
|
||||
topics {
|
||||
# id
|
||||
title
|
||||
slug
|
||||
}
|
||||
authors {
|
||||
id
|
||||
name
|
||||
slug
|
||||
userpic
|
||||
caption
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
|
@ -1,8 +1,8 @@
|
|||
import { gql } from '@urql/core'
|
||||
|
||||
export default gql`
|
||||
query GetCollabsQuery {
|
||||
getCollabs {
|
||||
query MyDraftsQuery {
|
||||
loadDrafts {
|
||||
authors {
|
||||
id
|
||||
slug
|
43
src/graphql/query/my-feed.ts
Normal file
43
src/graphql/query/my-feed.ts
Normal file
|
@ -0,0 +1,43 @@
|
|||
import { gql } from '@urql/core'
|
||||
|
||||
export default gql`
|
||||
query MyFeedQuery($options: LoadShoutsOptions) {
|
||||
myFeed(options: $options) {
|
||||
_id: slug
|
||||
id
|
||||
title
|
||||
subtitle
|
||||
slug
|
||||
layout
|
||||
cover
|
||||
# community
|
||||
mainTopic
|
||||
topics {
|
||||
# id
|
||||
title
|
||||
body
|
||||
slug
|
||||
stat {
|
||||
_id: shouts
|
||||
shouts
|
||||
authors
|
||||
followers
|
||||
}
|
||||
}
|
||||
authors {
|
||||
id
|
||||
name
|
||||
slug
|
||||
userpic
|
||||
}
|
||||
createdAt
|
||||
publishedAt
|
||||
stat {
|
||||
_id: viewed
|
||||
viewed
|
||||
reacted
|
||||
rating
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
Loading…
Reference in New Issue
Block a user