|
|
@ -42,7 +42,7 @@ type GQLContext struct {
|
|
|
|
ThreadType reflect.Type
|
|
|
|
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{
|
|
|
|
type_list := TypeList{
|
|
|
|
GQLTypeSignalInput(),
|
|
|
|
GQLTypeSignalInput(),
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -90,14 +90,6 @@ func NewGQLContext(additional_types TypeList, extended_types ObjTypeMap, extende
|
|
|
|
queries[key] = val
|
|
|
|
queries[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mutations := graphql.Fields{
|
|
|
|
|
|
|
|
"SendUpdate": GQLMutationSendUpdate(),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for key, val := range(extended_mutations) {
|
|
|
|
|
|
|
|
mutations[key] = val
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subscriptions := graphql.Fields{
|
|
|
|
subscriptions := graphql.Fields{
|
|
|
|
"Update": GQLSubscriptionUpdate(),
|
|
|
|
"Update": GQLSubscriptionUpdate(),
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -106,6 +98,14 @@ func NewGQLContext(additional_types TypeList, extended_types ObjTypeMap, extende
|
|
|
|
subscriptions[key] = val
|
|
|
|
subscriptions[key] = val
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mutations := graphql.Fields{
|
|
|
|
|
|
|
|
"SendUpdate": GQLMutationSendUpdate(),
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for key, val := range(extended_mutations) {
|
|
|
|
|
|
|
|
mutations[key] = val
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
schemaConfig := graphql.SchemaConfig{
|
|
|
|
schemaConfig := graphql.SchemaConfig{
|
|
|
|
Types: type_list,
|
|
|
|
Types: type_list,
|
|
|
|
Query: graphql.NewObject(graphql.ObjectConfig{
|
|
|
|
Query: graphql.NewObject(graphql.ObjectConfig{
|
|
|
|