Skip to content

Commit

Permalink
remove untested code
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jan 28, 2025
1 parent a9dfe34 commit 8308eb2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- run: bundle exec rake compile
- run: bundle exec rake test
- run: git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/*
- run: bundle exec pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
- run: bundle exec pronto run -f github_pr -c origin/${{ github.base_ref }}
if: ${{ !!matrix.coverage }}
env:
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
Expand Down
1 change: 1 addition & 0 deletions benchmark/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
require "stackprof"
require "memory_profiler"
require "graphql/batch"
require "securerandom"

module GraphQLBenchmark
QUERY_STRING = GraphQL::Introspection::INTROSPECTION_QUERY
Expand Down
43 changes: 17 additions & 26 deletions lib/graphql/backtrace/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,24 @@ def rows
end
end

if last_part
object = result.graphql_application_value.object.inspect
ast_node = result.graphql_selections.find { |s| s.alias == last_part || s.name == last_part }
field_defn = query.get_field(result.graphql_result_type, ast_node.name)
if field_defn
args = query.arguments_for(ast_node, field_defn).to_h
field_path = field_defn.path
if ast_node.alias
field_path += " as #{ast_node.alias}"
end
else
args = {}
field_path = "#{result.graphql_result_type.graphql_name}.#{last_part}"
end

rows << [
ast_node.position.join(":"),
field_path,
"#{object}",
args.inspect,
inspect_result(@override_value)
]
object = result.graphql_application_value.object.inspect
ast_node = result.graphql_selections.find { |s| s.alias == last_part || s.name == last_part }
field_defn = query.get_field(result.graphql_result_type, ast_node.name)
args = query.arguments_for(ast_node, field_defn).to_h
field_path = field_defn.path
if ast_node.alias
field_path += " as #{ast_node.alias}"
end

rows << [
ast_node.position.join(":"),
field_path,
"#{object}",
args.inspect,
inspect_result(@override_value)
]

rows << HEADERS
rows.reverse!
rows
Expand Down Expand Up @@ -147,11 +142,7 @@ def render_table(rows)
def value_at(runtime, path)
response = runtime.final_result
path.each do |key|
if response && (response = response[key])
next
else
break
end
response && (response = response[key])
end
response
end
Expand Down
2 changes: 0 additions & 2 deletions spec/graphql/authorization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ def self.unauthorized_object(err)
raise GraphQL::ExecutionError, "Unauthorized #{err.type.graphql_name}: #{err.object.inspect}"
end
end

# use GraphQL::Backtrace
end

class SchemaWithFieldHook < GraphQL::Schema
Expand Down

0 comments on commit 8308eb2

Please sign in to comment.