Class: Gitlab::Graphql::Queries::Fragments
- Inherits:
-
Object
- Object
- Gitlab::Graphql::Queries::Fragments
- Defined in:
- lib/gitlab/graphql/queries.rb
Overview
TODO: some queries live under app/graphql/queries - we should look there if/when we add fragments there See: gitlab.com/gitlab-org/gitlab/-/issues/361079 for fragments too.
Instance Method Summary collapse
- #get(frag_path) ⇒ Object
- #home ⇒ Object
- #home_ee ⇒ Object
-
#initialize(root, dir = 'app/assets/javascripts') ⇒ Fragments
constructor
A new instance of Fragments.
Constructor Details
Instance Method Details
#get(frag_path) ⇒ Object
262 263 264 |
# File 'lib/gitlab/graphql/queries.rb', line 262 def get(frag_path) @store[frag_path] ||= Definition.new(frag_path, self) end |
#home ⇒ Object
254 255 256 |
# File 'lib/gitlab/graphql/queries.rb', line 254 def home @home ||= (@root / @dir).to_s end |
#home_ee ⇒ Object
258 259 260 |
# File 'lib/gitlab/graphql/queries.rb', line 258 def home_ee @home_ee ||= (@root / 'ee' / @dir).to_s end |