Skip to content

Client Queries fail on any nonNull perameters with coerced null value #1004

Answered by MarcusDunn
MarcusDunn asked this question in Q&A
Discussion options

You must be logged in to vote

I fixed the issue by renaming pID, I to pid. I have no idea why that fixed it, my final query and schema were as follows:

test function:

    @Test
    internal fun `test Patient does not throw`() {
        val patientQuery = PatientQuery(client.value)

        runBlocking {
            val result = patientQuery.execute(
                PatientQuery.Variables(
                    pid = 21953564
                )
            )
            assert(result.errors.isNullOrEmpty()) { "result: $result" }
        }
    }

query

query patientQuery($pid: Int!) {
    patient(pid: $pid) {
        firstName
    }
}

a small portion of the schema

type Query {
    patient(pid: Int!): Patient!
}

and the gene…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@MarcusDunn
Comment options

Comment options

You must be logged in to vote
1 reply
@smyrick
Comment options

Answer selected by MarcusDunn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants