lib/graphql/stitching/executor.rb in graphql-stitching-0.0.1 vs lib/graphql/stitching/executor.rb in graphql-stitching-0.1.0

- old
+ new

@@ -217,12 +217,17 @@ result = {} result["data"] = @data if @data && @data.length > 0 result["errors"] = @errors if @errors.length > 0 - result if document.nil? - - GraphQL::Stitching::Shaper.new(supergraph: @supergraph, document: document, raw: result).perform! + if document && result["data"] + GraphQL::Stitching::Shaper.new( + schema: @supergraph.schema, + document: document, + ).perform!(result) + else + result + end end private def exec!(after_keys = [0])