diff --git a/resolvers/draft.py b/resolvers/draft.py index cb781919..491dac0a 100644 --- a/resolvers/draft.py +++ b/resolvers/draft.py @@ -515,7 +515,7 @@ async def publish_draft(_: None, info: GraphQLResolveInfo, draft_id: int) -> dic # Возвращаем обновленный черновик с информацией о shout draft_dict = create_draft_dict(draft) - # Добавляем информацию о shout + # Добавляем информацию о публикации draft_dict["shout"] = {"id": shout.id, "slug": shout.slug, "published_at": shout.published_at} return {"draft": draft_dict} diff --git a/schema/type.graphql b/schema/type.graphql index 4309a734..99742ebe 100644 --- a/schema/type.graphql +++ b/schema/type.graphql @@ -107,13 +107,6 @@ type Shout { stat: Stat score: Float } - -type PublicationInfo { - id: Int! - slug: String! - published_at: Int -} - type Draft { id: Int! created_at: Int! @@ -138,7 +131,7 @@ type Draft { deleted_by: Author authors: [Author]! topics: [Topic]! - publication: PublicationInfo + shout: Shout } type Stat {