Skip to content

This fixes the ImmutableMap .map problem where lists can have null in them#2848

Merged
bbakerman merged 1 commit into
masterfrom
ValueToVariableValueCompiler_allows_null_list_entries
Jun 8, 2022
Merged

This fixes the ImmutableMap .map problem where lists can have null in them#2848
bbakerman merged 1 commit into
masterfrom
ValueToVariableValueCompiler_allows_null_list_entries

Conversation

@bbakerman

Copy link
Copy Markdown
Member

Some values in the NIV can be a list with null values. So we cant use ImmutabvleList in the mapper as its wont accept nulls entries

java.lang.NullPointerException: null
    at graphql.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:889)
    at graphql.com.google.common.collect.ImmutableList$Builder.add(ImmutableList.java:813)
    at graphql.collect.ImmutableKit.map(ImmutableKit.java:85)
    at graphql.normalized.ValueToVariableValueCompiler.normalisedValueToVariableValues(ValueToVariableValueCompiler.java:75)
    at graphql.normalized.ValueToVariableValueCompiler.normalisedValueToVariableValue(ValueToVariableValueCompiler.java:53)
    at graphql.normalized.ValueToVariableValueCompiler.lambda$normalisedValueToVariableValues$0(ValueToVariableValueCompiler.java:82)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at graphql.normalized.ValueToVariableValueCompiler.normalisedValueToVariableValues(ValueToVariableValueCompiler.java:81)
    at graphql.normalized.ValueToVariableValueCompiler.normalisedValueToVariableValue(ValueToVariableValueCompiler.java:55)
    at graphql.normalized.ValueToVariableValueCompiler.lambda$normalisedValueToVariableValues$0(ValueToVariableValueCompiler.java:82)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at graphql.normalized.ValueToVariableValueCompiler.normalisedValueToVariableValues(ValueToVariableValueCompiler.java:81)
    at graphql.normalized.ValueToVariableValueCompiler.normalisedValueToVariableValue(ValueToVariableValueCompiler.java:55)
    at graphql.normalized.ValueToVariableValueCompiler.normalizedInputValueToVariable(ValueToVariableValueCompiler.java:32)
    at graphql.normalized.VariableAccumulator.accumulateVariable(VariableAccumulator.java:36)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.argValue(ExecutableNormalizedOperationToAstCompiler.java:228)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.createArguments(ExecutableNormalizedOperationToAstCompiler.java:187)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.selectionForNormalizedField(ExecutableNormalizedOperationToAstCompiler.java:162)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.subselectionsForNormalizedField(ExecutableNormalizedOperationToAstCompiler.java:108)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.selectionForNormalizedField(ExecutableNormalizedOperationToAstCompiler.java:153)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.subselectionsForNormalizedField(ExecutableNormalizedOperationToAstCompiler.java:108)
    at graphql.normalized.ExecutableNormalizedOperationToAstCompiler.compileToDocument(ExecutableNormalizedOperationToAstCompiler.java:72)

@bbakerman bbakerman added this to the 19.0 milestone Jun 8, 2022
@bbakerman bbakerman merged commit a2ac2a8 into master Jun 8, 2022
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.

1 participant