Try to get interface type differently

graph-rework-2
noah metz 2023-06-27 13:00:53 -06:00
parent 18703d1a6d
commit ff68f131e5
1 changed files with 3 additions and 3 deletions

@ -471,9 +471,9 @@ func MakeGQLHandlers(ctx * GraphContext, server * GQLThread) (func(http.Response
gql_types = append(gql_types, v) gql_types = append(gql_types, v)
} }
node_type := reflect.TypeOf((GraphNode)(nil)) node_type := reflect.TypeOf((*GraphNode)(nil)).Elem()
lockable_type := reflect.TypeOf((Lockable)(nil)) lockable_type := reflect.TypeOf((*Lockable)(nil)).Elem()
thread_type := reflect.TypeOf((Thread)(nil)) thread_type := reflect.TypeOf((*Thread)(nil)).Elem()
for go_t, gql_t := range(server.extended_types) { for go_t, gql_t := range(server.extended_types) {
if go_t.Implements(node_type) { if go_t.Implements(node_type) {