From 97c1405e3ccd58e56a133f8b985bba4e41f62e25 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sat, 1 Jul 2023 13:47:12 -0600 Subject: [PATCH] Fixed paramter order of GQLContext init --- graph.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/graph.go b/graph.go index 7619fc1..0ad3fd7 100644 --- a/graph.go +++ b/graph.go @@ -42,7 +42,7 @@ type GQLContext struct { ThreadType reflect.Type } -func NewGQLContext(additional_types TypeList, extended_types ObjTypeMap, extended_queries FieldMap, extended_mutations FieldMap, extended_subscriptions FieldMap) (*GQLContext, error) { +func NewGQLContext(additional_types TypeList, extended_types ObjTypeMap, extended_queries FieldMap, extended_subscriptions FieldMap, extended_mutations FieldMap) (*GQLContext, error) { type_list := TypeList{ GQLTypeSignalInput(), } @@ -90,14 +90,6 @@ func NewGQLContext(additional_types TypeList, extended_types ObjTypeMap, extende queries[key] = val } - mutations := graphql.Fields{ - "SendUpdate": GQLMutationSendUpdate(), - } - - for key, val := range(extended_mutations) { - mutations[key] = val - } - subscriptions := graphql.Fields{ "Update": GQLSubscriptionUpdate(), } @@ -106,6 +98,14 @@ func NewGQLContext(additional_types TypeList, extended_types ObjTypeMap, extende subscriptions[key] = val } + mutations := graphql.Fields{ + "SendUpdate": GQLMutationSendUpdate(), + } + + for key, val := range(extended_mutations) { + mutations[key] = val + } + schemaConfig := graphql.SchemaConfig{ Types: type_list, Query: graphql.NewObject(graphql.ObjectConfig{