code: func (c *QueryController) List(ctx *app.ListQueryContext) error {
  	currentUserIdentityID, err := login.ContextIdentity(ctx)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
  	}
  	var queries []query.Query
  	err = application.Transactional(c.db, func(appl application.Application) error {
  		err = appl.Spaces().CheckExists(ctx, ctx.SpaceID)
  		if err != nil {
  			return errs.WithStack(err)
  		}
  		queries, err = appl.Queries().ListByCreator(ctx, ctx.SpaceID, *currentUserIdentityID)
  		return errs.WithStack(err)
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	res := &app.QueryList{}
  	res.Data = ConvertQueries(ctx.Request, queries)
  	res.Meta = &app.WorkItemListResponseMeta{
  		TotalCount: len(res.Data),
  	}
  	return ctx.OK(res)
  }
docs: // List runs the list action.