Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove InvalidNullError#value as it is always nil #5256

Merged

Conversation

ravangen
Copy link
Contributor

Resolves #5243

InvalidNullError#value is always set to nil, it won't be a GraphQL::ExecutionError as the docs suggests.

case value
when nil
if is_non_null
set_result(selection_result, result_name, nil, false, is_non_null) do
# When this comes from a list item, use the parent object:
parent_type = selection_result.is_a?(GraphQLResultArray) ? selection_result.graphql_parent.graphql_result_type : selection_result.graphql_result_type
# This block is called if `result_name` is not dead. (Maybe a previous invalid nil caused it be marked dead.)
err = parent_type::InvalidNullError.new(parent_type, field, value)

@rmosolgo
Copy link
Owner

Derp, sorry I missed this when rounding up to release 2.4.11 😖 Now it has conflicts...

@ravangen ravangen force-pushed the ravangen/remove-InvalidNullError-value branch from 2db628d to d1a6f1f Compare March 3, 2025 02:41
@ravangen
Copy link
Contributor Author

ravangen commented Mar 3, 2025

No worries, I've resolved the conflicts

@rmosolgo
Copy link
Owner

rmosolgo commented Mar 3, 2025

Thanks!

@rmosolgo rmosolgo merged commit 7a9b7db into rmosolgo:master Mar 3, 2025
13 of 14 checks passed
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.

InvalidNullError docs for value attribute
2 participants