From f1067f3b32bc32712fc0e02d17f83ab61970ee2d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 15 Jun 2020 09:46:08 +0200 Subject: [PATCH] Fix comment threads display Signed-off-by: Thomas Citharel --- js/src/graphql/comment.ts | 4 ++-- lib/graphql/schema/event.ex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/graphql/comment.ts b/js/src/graphql/comment.ts index 8447c2f1f..6421edbd9 100644 --- a/js/src/graphql/comment.ts +++ b/js/src/graphql/comment.ts @@ -58,11 +58,11 @@ export const COMMENTS_THREADS = gql` id uuid comments { - ...CommentFields + ...CommentRecursive } } } - ${COMMENT_FIELDS_FRAGMENT} + ${COMMENT_RECURSIVE_FRAGMENT} `; export const CREATE_COMMENT_FROM_EVENT = gql` diff --git a/lib/graphql/schema/event.ex b/lib/graphql/schema/event.ex index fa90be6e0..67b47e573 100644 --- a/lib/graphql/schema/event.ex +++ b/lib/graphql/schema/event.ex @@ -8,7 +8,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do import Absinthe.Resolution.Helpers, only: [dataloader: 1] import Mobilizon.GraphQL.Helpers.Error - alias Mobilizon.{Actors, Addresses, Events} + alias Mobilizon.{Actors, Addresses, Conversations, Events} alias Mobilizon.GraphQL.Resolvers.{Event, Picture, Tag} alias Mobilizon.GraphQL.Schema @@ -79,7 +79,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do ) field(:comments, list_of(:comment), description: "The comments in reply to the event") do - resolve(dataloader(Events)) + resolve(dataloader(Conversations)) end # field(:tracks, list_of(:track))