Class: GraphQL::Stitching::Shaper
- Inherits:
-
Object
- Object
- GraphQL::Stitching::Shaper
- Defined in:
- lib/graphql/stitching/shaper.rb
Instance Method Summary collapse
-
#initialize(schema:, request:) ⇒ Shaper
constructor
A new instance of Shaper.
- #perform!(raw) ⇒ Object
Constructor Details
#initialize(schema:, request:) ⇒ Shaper
Returns a new instance of Shaper.
7 8 9 10 |
# File 'lib/graphql/stitching/shaper.rb', line 7 def initialize(schema:, request:) @schema = schema @request = request end |
Instance Method Details
#perform!(raw) ⇒ Object
12 13 14 15 |
# File 'lib/graphql/stitching/shaper.rb', line 12 def perform!(raw) root_type = @schema.public_send(@request.operation.operation_type) resolve_object_scope(raw, root_type, @request.operation.selections) end |