From 5b0639eb37bfe34e3ceca01d3f504e2da3175b0e Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 19 Jun 2023 15:33:42 -0600 Subject: [PATCH] fix --- gql.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gql.go b/gql.go index f396622..140aadb 100644 --- a/gql.go +++ b/gql.go @@ -137,6 +137,11 @@ func GQLInterfaceNode() *graphql.Interface { gql_interface_node = graphql.NewInterface(graphql.InterfaceConfig{ Name: "Node", ResolveType: func(p graphql.ResolveTypeParams) *graphql.Object { + + if reflect.TypeOf(p.Value) == reflect.TypeOf((*BaseNode)(nil)) { + return value + } + valid_events, ok := p.Context.Value("valid_events").(map[reflect.Type]*graphql.Object) if ok == false { return nil