Skip to content

Add GraphQlClient and GraphQlTester Kotlin extensions #1331

@bclozel

Description

@bclozel

Both GraphQlClient and GraphQlTester APIs use the ParameterizedType as an argument because of Java's type erasure.
We can contribute Kotlin extensions for such cases to get reified type parameters.

For example this Java code:

Project project = graphQlClient.document(document) 
	.retrieveSync("project") 
	.toEntity(Project.class); 

can become with Kotlin:

val project = graphQlClient.document(document).retrieveSync("project").toEntity<Project>()

Metadata

Metadata

Assignees

Labels

in: coreIssues related to config and core supportin: testIssues related to the test moduletype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions