Module: GraphQL::Testing::Helpers::SchemaHelpers
- Includes:
- GraphQL::Testing::Helpers
- Defined in:
- lib/graphql/testing/helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #run_graphql_field(field_path, object, arguments: {}, context: {}, visibility_profile: nil) ⇒ Object
- #with_resolution_context(**kwargs, &block) ⇒ Object
Class Method Details
.for(schema_class) ⇒ Object
166 167 168 169 170 171 |
# File 'lib/graphql/testing/helpers.rb', line 166 def self.for(schema_class) Module.new do include SchemaHelpers @@schema_class_for_helpers = schema_class end end |
Instance Method Details
#run_graphql_field(field_path, object, arguments: {}, context: {}, visibility_profile: nil) ⇒ Object
157 158 159 |
# File 'lib/graphql/testing/helpers.rb', line 157 def run_graphql_field(field_path, object, arguments: {}, context: {}, visibility_profile: nil) super(@@schema_class_for_helpers, field_path, object, arguments: arguments, context: context, visibility_profile: visibility_profile) end |
#with_resolution_context(**kwargs, &block) ⇒ Object
161 162 163 164 |
# File 'lib/graphql/testing/helpers.rb', line 161 def with_resolution_context(**kwargs, &block) # schema will be added later super(nil, **kwargs, &block) end |