VerachadW / kraph

GraphQL request string builder written in Kotlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request without returning parameters

rsolmano opened this issue · comments

Hello, guys, thanks for you work.
Could you please help me to find out how to build following query with kraph:

query {
    vendors(dc: 5820)
}

Here is part of my schema:

type Query {
    vendors(dc: Int!): [Int]
}

I've already tried to execute this code:

Kraph {
    query {
        func(name = "vendors", args = mapOf("dc" to 5820)) {}
    }
}

But it fails with exception:
me.lazmaid.kraph.NoFieldsInSelectionSetException: No field elements inside "vendors" block

Thanks!

👍 to this request. Not all mutations, for instance, would require a selection of fields to be provided.