From 3405521e9fb5dfc117ee016104929c24f272ba39 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Wed, 21 Jun 2023 11:50:57 -0600 Subject: [PATCH] Added children to resource interface --- gql.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gql.go b/gql.go index 7abfca8..783325d 100644 --- a/gql.go +++ b/gql.go @@ -491,6 +491,10 @@ func GQLInterfaceResource() * graphql.Interface { Type: GQLListResource(), }) + gql_interface_resource.AddFieldConfig("Children", &graphql.Field{ + Type: GQLListResource(), + }) + gql_interface_resource.AddFieldConfig("Owner", &graphql.Field{ Type: GQLInterfaceNode(), }) @@ -573,6 +577,11 @@ func GQLTypeGQLServer() * graphql.Object { Resolve: GQLResourceParents, }) + gql_type_gql_server.AddFieldConfig("Children", &graphql.Field{ + Type: GQLListResource(), + Resolve: GQLResourceParents, + }) + gql_type_gql_server.AddFieldConfig("Owner", &graphql.Field{ Type: GQLInterfaceNode(), Resolve: GQLResourceOwner, @@ -617,6 +626,11 @@ func GQLTypeBaseResource() * graphql.Object { Resolve: GQLResourceParents, }) + gql_type_gql_server.AddFieldConfig("Children", &graphql.Field{ + Type: GQLListResource(), + Resolve: GQLResourceParents, + }) + gql_type_base_resource.AddFieldConfig("Owner", &graphql.Field{ Type: GQLInterfaceNode(), Resolve: GQLResourceOwner,