0

When I use ExpediaGroup graphql-kotlin client to call a GQL query, it inserts a field besides the query, variables and operationName. I understand this field comes from my extended class constructor parameter. I don't need this field. Is there a way to suppress it?

My class:

class SubmissionQuery(val submissionUuid: String): GraphQLClientRequest<SubmissionQuery.Result> { ... }

Request body:

{
   "submissionUuid":"0c00a000-3f03-4f57-b999-7082e2a53fa1",
   "operationName":"",
   "query":"query($uuid: String!) {myQuery(uuid: $uuid){uuid}}",
   "variables":{"uuid":"0c00a000-3f03-4f57-b999-7082e2a53fa1"}
}
codewario
  • 19,553
  • 20
  • 90
  • 159
heringer
  • 2,698
  • 1
  • 20
  • 33

1 Answers1

0

Got it in the last minute: just change the parameter to private in constructor.

class SubmissionQuery(private val submissionUuid: String)
heringer
  • 2,698
  • 1
  • 20
  • 33