package resolver import ( "git.aiterp.net/rpdata/api/model/story" "git.aiterp.net/rpdata/api/resolver/types" ) // TagInput resolves the TagInput input type TagInput struct { Kind string Name string } // Tags implements the tags query func (r *QueryResolver) Tags() ([]*types.TagResolver, error) { tags, err := story.ListTags() if err != nil { return nil, err } resolvers := make([]*types.TagResolver, len(tags)) for i, tag := range tags { resolvers[i] = &types.TagResolver{T: tag} } return resolvers, nil }