Class: GraphQL::Schema::Warden::VisibilityProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/schema/warden.rb

Instance Method Summary collapse

Constructor Details

#initialize(warden) ⇒ VisibilityProfile

Returns a new instance of VisibilityProfile.



130
131
132
# File 'lib/graphql/schema/warden.rb', line 130

def initialize(warden)
  @warden = warden
end

Instance Method Details

#all_types ⇒ Object



182
183
184
# File 'lib/graphql/schema/warden.rb', line 182

def all_types
  @warden.reachable_types
end

#argument(owner, arg_name) ⇒ Object



150
151
152
# File 'lib/graphql/schema/warden.rb', line 150

def argument(owner, arg_name)
  @warden.get_argument(owner, arg_name)
end

#arguments(owner) ⇒ Object



166
167
168
# File 'lib/graphql/schema/warden.rb', line 166

def arguments(owner)
  @warden.arguments(owner)
end

#directive_exists?(dir_name) ⇒ Boolean

Returns:

  • (Boolean)


138
139
140
# File 'lib/graphql/schema/warden.rb', line 138

def directive_exists?(dir_name)
  @warden.directives.any? { |d| d.graphql_name == dir_name }
end

#directives ⇒ Object



134
135
136
# File 'lib/graphql/schema/warden.rb', line 134

def directives
  @warden.directives
end

#enum_values(enum_type) ⇒ Object



178
179
180
# File 'lib/graphql/schema/warden.rb', line 178

def enum_values(enum_type)
  @warden.enum_values(enum_type)
end

#field(owner, field_name) ⇒ Object



146
147
148
# File 'lib/graphql/schema/warden.rb', line 146

def field(owner, field_name)
  @warden.get_field(owner, field_name)
end

#fields(owner) ⇒ Object



170
171
172
# File 'lib/graphql/schema/warden.rb', line 170

def fields(owner)
  @warden.fields(owner)
end

#interfaces(obj_type) ⇒ Object



186
187
188
# File 'lib/graphql/schema/warden.rb', line 186

def interfaces(obj_type)
  @warden.interfaces(obj_type)
end

#loadable?(t, ctx) ⇒ Boolean

TODO remove ctx here?

Returns:

  • (Boolean)


190
191
192
# File 'lib/graphql/schema/warden.rb', line 190

def loadable?(t, ctx) # TODO remove ctx here?
  @warden.loadable?(t, ctx)
end

#loadable_possible_types(t, ctx) ⇒ Object



194
195
196
# File 'lib/graphql/schema/warden.rb', line 194

def loadable_possible_types(t, ctx)
  @warden.loadable_possible_types(t, ctx)
end

#mutation_root ⇒ Object



158
159
160
# File 'lib/graphql/schema/warden.rb', line 158

def mutation_root
  @warden.root_type_for_operation("mutation")
end

#possible_types(type) ⇒ Object



174
175
176
# File 'lib/graphql/schema/warden.rb', line 174

def possible_types(type)
  @warden.possible_types(type)
end

#query_root ⇒ Object



154
155
156
# File 'lib/graphql/schema/warden.rb', line 154

def query_root
  @warden.root_type_for_operation("query")
end

#reachable_type?(type_name) ⇒ Boolean

Returns:

  • (Boolean)


198
199
200
# File 'lib/graphql/schema/warden.rb', line 198

def reachable_type?(type_name)
  !!@warden.reachable_type?(type_name)
end

#subscription_root ⇒ Object



162
163
164
# File 'lib/graphql/schema/warden.rb', line 162

def subscription_root
  @warden.root_type_for_operation("subscription")
end

#type(name) ⇒ Object



142
143
144
# File 'lib/graphql/schema/warden.rb', line 142

def type(name)
  @warden.get_type(name)
end

#visible_enum_value?(enum_value, ctx = nil) ⇒ Boolean

Returns:

  • (Boolean)


202
203
204
# File 'lib/graphql/schema/warden.rb', line 202

def visible_enum_value?(enum_value, ctx = nil)
  @warden.visible_enum_value?(enum_value, ctx)
end