Skip to content

Commit

Permalink
comment exported methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Mar 30, 2023
1 parent 4502d5b commit 5e77c01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graphql2/graphqlapp/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ func (q *Query) SlackChannel(ctx context.Context, id string) (*slack.Channel, er
return q.SlackStore.Channel(ctx, id)
}

// SlackUserGroup is a GraphQL resolver for a Slack user group.
func (q *Query) SlackUserGroup(ctx context.Context, id string) (*slack.UserGroup, error) {
if !expflag.ContextHas(ctx, expflag.SlackUserGroups) {
return nil, validation.NewGenericError("Slack user groups are not enabled")
}
return q.SlackStore.UserGroup(ctx, id)
}

// SlackUserGroups is a GraphQL resolver for a list of Slack user groups.
func (q *Query) SlackUserGroups(ctx context.Context, input *graphql2.SlackUserGroupSearchOptions) (conn *graphql2.SlackUserGroupConnection, err error) {
if !expflag.ContextHas(ctx, expflag.SlackUserGroups) {
return nil, validation.NewGenericError("Slack user groups are not enabled")
Expand Down

0 comments on commit 5e77c01

Please sign in to comment.