From e51e823b19cb17302b968fe1f35ab5d0bfe64204 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Fri, 21 Jul 2023 18:07:49 -0600 Subject: [PATCH] Fixed default thread fields --- gql_types.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gql_types.go b/gql_types.go index 7f78172..5e60051 100644 --- a/gql_types.go +++ b/gql_types.go @@ -53,12 +53,6 @@ func AddThreadFields(obj *graphql.Object) { Type: GQLInterfaceThread.Type, Resolve: GQLThreadParent, }) - - obj.AddFieldConfig("Listen", &graphql.Field{ - Type: graphql.String, - Resolve: GQLThreadListen, - }) - } var GQLTypeUser = NewSingleton(func() *graphql.Object { @@ -113,6 +107,11 @@ var GQLTypeGQLThread = NewSingleton(func() *graphql.Object { Resolve: GQLThreadUsers, }) + gql_type_gql_thread.AddFieldConfig("Listen", &graphql.Field{ + Type: graphql.String, + Resolve: GQLThreadListen, + }) + return gql_type_gql_thread }, nil)