Class: Types::WorkItems::SavedViews::SavedViewType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/work_items/saved_views/saved_view_type.rb

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#filter_warningsObject



79
80
81
# File 'app/graphql/types/work_items/saved_views/saved_view_type.rb', line 79

def filter_warnings
  []
end

#filtersObject



75
76
77
# File 'app/graphql/types/work_items/saved_views/saved_view_type.rb', line 75

def filters
  {}
end

#share_urlObject



91
92
93
94
95
96
97
98
99
100
# File 'app/graphql/types/work_items/saved_views/saved_view_type.rb', line 91

def share_url
  namespace = object.namespace

  if namespace.is_a?(::Group)
    Gitlab::Routing.url_helpers.group_saved_view_url(namespace, object.id)
  else
    project = namespace.project
    Gitlab::Routing.url_helpers.project_saved_view_url(project, object.id)
  end
end

#sortObject



87
88
89
# File 'app/graphql/types/work_items/saved_views/saved_view_type.rb', line 87

def sort
  object.sort&.to_sym
end

#subscribedObject



83
84
85
# File 'app/graphql/types/work_items/saved_views/saved_view_type.rb', line 83

def subscribed
  false
end