Skip to content

"Should have been validated before" error being thrown on a NonNull input value #3631

Closed

Description

@justinsumida

We recently upgraded to GraphQL-Java 21.3 and are getting a new error: "Internal error: should never happen: Should have been validated before."

The error is cropping up on a mutation that looks something like this:

mutation foo { namespaceMutation(xyz...) { mutationFunc(input: {args: .....}) } }

our input looks something like
{
arg1: []
arg2: ID!
}

We only are seeing this error on inputs. I'm not sure why we are not getting the normal coerced null error.

Activity

  1. justinsumida commented on Jun 13, 2024

    @justinsumida
    Author

    It seems like someone has seen something similar before: #3278

    Do I need to jump to a different version to get the fix?

  2. justinsumida commented on Jun 13, 2024

    @justinsumida
    Author

    I discovered the error is processed and sent into InstrumentationContexts for consumption. I am able to track our instrumentation and see the error, but it is never thrown. Is there an overridden method best for throwing those exceptions?

  3. justinsumida commented on Jun 13, 2024

    @justinsumida
    Author

    Closing... I took the advice of MaxQueryComplexityInstrumentation which did an errors empty check before running its validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions