Skip to content

Remove InvalidNullError#value as it is always nil#5256

Merged
rmosolgo merged 1 commit intormosolgo:masterfrom
Shopify:ravangen/remove-InvalidNullError-value
Mar 3, 2025
Merged

Remove InvalidNullError#value as it is always nil#5256
rmosolgo merged 1 commit intormosolgo:masterfrom
Shopify:ravangen/remove-InvalidNullError-value

Conversation

@ravangen
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

ravangen commented Mar 3, 2025

No worries, I've resolved the conflicts

@rmosolgo
Copy link
Copy Markdown
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