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