lib/graphql/stitching/executor.rb in graphql-stitching-1.1.1 vs lib/graphql/stitching/executor.rb in graphql-stitching-1.2.0

- old
+ new

@@ -6,14 +6,14 @@ module Stitching class Executor attr_reader :supergraph, :request, :plan, :data, :errors attr_accessor :query_count - def initialize(supergraph:, request:, plan:, nonblocking: false) - @supergraph = supergraph + def initialize(request, nonblocking: false) @request = request - @plan = plan + @supergraph = request.supergraph + @plan = request.plan @data = {} @errors = [] @query_count = 0 @exec_cycles = 0 @dataloader = GraphQL::Dataloader.new(nonblocking: nonblocking) @@ -22,13 +22,10 @@ def perform(raw: false) exec! result = {} if @data && @data.length > 0 - result["data"] = raw ? @data : GraphQL::Stitching::Shaper.new( - supergraph: @supergraph, - request: @request, - ).perform!(@data) + result["data"] = raw ? @data : GraphQL::Stitching::Shaper.new(@request).perform!(@data) end if @errors.length > 0 result["errors"] = @errors end