get-shouts-drafts

This commit is contained in:
Untone 2024-03-05 18:52:34 +03:00
parent dc719120b2
commit 449154bd1b
2 changed files with 9 additions and 3 deletions

View File

@ -177,7 +177,7 @@ export const apiClient = {
getDrafts: async (): Promise<Shout[]> => {
const response = await apiClient.private.query(draftsLoad, {}).toPromise()
console.debug('[graphql.client.core] getDrafts:', response)
return response.data.load_shouts_drafts
return response.data.get_shouts_drafts
},
createReaction: async (input: ReactionInput) => {
const response = await apiClient.private.mutation(reactionCreate, { reaction: input }).toPromise()

View File

@ -2,7 +2,7 @@ import { gql } from '@urql/core'
export default gql`
query LoadDraftsQuery {
load_shouts_drafts {
get_shouts_drafts {
id
title
subtitle
@ -23,6 +23,13 @@ export default gql`
followers
}
}
created_by {
id
name
slug
pic
created_at
}
authors {
id
name
@ -35,7 +42,6 @@ export default gql`
featured_at
stat {
viewed
rating
commented
}