From e59b4f57fd71def4bfd400c25980da4e6074fd85 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Fri, 21 Jul 2023 18:09:13 -0600 Subject: [PATCH] fixed user TypeOf --- gql_types.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gql_types.go b/gql_types.go index 5e60051..b16054a 100644 --- a/gql_types.go +++ b/gql_types.go @@ -63,19 +63,8 @@ var GQLTypeUser = NewSingleton(func() *graphql.Object { GQLInterfaceLockable.Type, }, IsTypeOf: func(p graphql.IsTypeOfParams) bool { - ctx, ok := p.Context.Value("graph_context").(*Context) - if ok == false { - return false - } - - lockable_type := ctx.GQL.LockableType - value_type := reflect.TypeOf(p.Value) - - if value_type.Implements(lockable_type) { - return true - } - - return false + _, ok := p.Value.(*User) + return ok }, Fields: graphql.Fields{}, })