Fix BaseLockable gql type

graph-rework-2
noah metz 2023-06-28 01:53:39 -06:00
parent 82ae5279b0
commit 2c0fced413
2 changed files with 1 additions and 2 deletions

@ -454,7 +454,7 @@ func MakeGQLHandlers(ctx * GraphContext, server * GQLThread) (func(http.Response
valid_nodes := map[reflect.Type]*graphql.Object{} valid_nodes := map[reflect.Type]*graphql.Object{}
valid_lockables := map[reflect.Type]*graphql.Object{} valid_lockables := map[reflect.Type]*graphql.Object{}
valid_threads := map[reflect.Type]*graphql.Object{} valid_threads := map[reflect.Type]*graphql.Object{}
valid_lockables[reflect.TypeOf((*BaseLockable)(nil))] = GQLTypeBaseNode() valid_lockables[reflect.TypeOf((*BaseLockable)(nil))] = GQLTypeBaseLockable()
for t, v := range(valid_lockables) { for t, v := range(valid_lockables) {
valid_nodes[t] = v valid_nodes[t] = v
} }

@ -560,7 +560,6 @@ func GQLTypeBaseLockable() * graphql.Object {
IsTypeOf: func(p graphql.IsTypeOfParams) bool { IsTypeOf: func(p graphql.IsTypeOfParams) bool {
ctx, ok := p.Context.Value("graph_context").(*GraphContext) ctx, ok := p.Context.Value("graph_context").(*GraphContext)
if ok == false { if ok == false {
panic("PANIC_AT_THE_DISCO")
return false return false
} }