graph-rework
noah metz 2023-06-19 15:33:42 -06:00
parent db4cec8f13
commit 5b0639eb37
1 changed files with 5 additions and 0 deletions

@ -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