Skip to content

Conversation

@povilasjurcys
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.17%. Comparing base (c8aa7b0) to head (dc156fc).
⚠️ Report is 1 commits behind head on master.

❌ Your patch status has failed because the patch coverage (65.21%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #314      +/-   ##
==========================================
- Coverage   98.57%   98.17%   -0.41%     
==========================================
  Files          67       68       +1     
  Lines        1901     1920      +19     
==========================================
+ Hits         1874     1885      +11     
- Misses         27       35       +8     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements functionality to skip custom NotNull errors when custom error rendering is used. The main purpose is to prevent GraphQL null errors from being shown to users when errors have already been manually rendered by the controller.

  • Adds type error hooks (before_type_error and after_type_error) to the GraphQL router for custom error handling
  • Introduces a rendered_errors flag in the GraphQL context to track when errors have been manually rendered
  • Modifies the schema to skip GraphQL::InvalidNullError when the rendered_errors flag is set

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/graphql_rails/router/schema.rb Creates new Schema class with type error handling and null error skipping logic
lib/graphql_rails/router/schema_builder.rb Refactors to use the new Schema class instead of inline GraphQL::Schema
lib/graphql_rails/controller.rb Sets rendered_errors flag in context when errors are rendered
lib/graphql_rails/router.rb Adds type error hook methods to the router's raw action names
spec/lib/graphql_rails/controller_spec.rb Adds test coverage for the rendered_errors flag behavior
spec/lib/graphql_rails/controller/handle_controller_error_spec.rb Adds test coverage for error handling scenarios
docs/components/routes.md Documents the new type error hook functionality
CHANGELOG.md Records the changes in the changelog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

povilasjurcys and others added 4 commits October 9, 2025 10:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@povilasjurcys povilasjurcys requested a review from Copilot October 9, 2025 07:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@povilasjurcys povilasjurcys merged commit e22f98a into master Oct 9, 2025
9 of 10 checks passed
@povilasjurcys povilasjurcys deleted the skip_non_null_errors_on_custom_render branch October 9, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants