class GraphQL::Query::Context::ScopedContext

def each_present_path_ctx

but look up the tree for previously-assigned scoped values
Start at the current location,
def each_present_path_ctx
  search_path = current_path.dup
  if (current_path_ctx = @path_contexts[search_path])
    yield(current_path_ctx)
  end
  while search_path.size > 0
    search_path.pop # look one level higher
    if (search_path_ctx = @path_contexts[search_path])
      yield(search_path_ctx)
    end
  end
end