Fixed paramter order of GQLContext init

graph-rework-2
noah metz 2023-07-01 13:47:12 -06:00
parent b7a7d509e6
commit 97c1405e3c
1 changed files with 9 additions and 9 deletions

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