Added mutations for add/remove members

gql_cataclysm
noah metz 2023-10-11 19:08:12 -06:00
parent b32f264879
commit c63ad91252
1 changed files with 14 additions and 6 deletions

@ -1167,12 +1167,20 @@ func NewGQLExtContext() *GQLExtContext {
panic(err) panic(err)
} }
context.Mutation.AddFieldConfig("stop", &graphql.Field{ err = context.AddSignalMutation("stop", "node_id", reflect.TypeOf(StopSignal{}))
Type: graphql.String, if err != nil {
Resolve: func(p graphql.ResolveParams) (interface{}, error) { panic(err)
return nil, fmt.Errorf("NOT_IMPLEMENTED") }
},
}) err = context.AddSignalMutation("addMember", "group_id", reflect.TypeOf(AddMemberSignal{}))
if err != nil {
panic(err)
}
err = context.AddSignalMutation("removeMember", "group_id", reflect.TypeOf(RemoveMemberSignal{}))
if err != nil {
panic(err)
}
context.Subscription.AddFieldConfig("Self", &graphql.Field{ context.Subscription.AddFieldConfig("Self", &graphql.Field{
Type: context.Interfaces["Node"].Interface, Type: context.Interfaces["Node"].Interface,