- GraphQL kotlin spring boot server for demoing Kotlin co-routines
- Requires java 11.0.3 or higher
mvn clean install
git fetch --tags
to pull down all the tagsmvn spring-boot:run
will start up server and playground can be accessed at http://localhost:8080/playground- GraphQL query:
query {
propertyResults {
properties {
id
neighborhoodName
name
}
filters {
filterType
options
}
}
}
During the session we will demo how to convert PropertyResults
downstream calls to lazy co-routines
step-0
Non lazy version of downstream services (git checkout step-0
)step-1
Duplicate downstream calls (git checkout step-1
)step-2
ConvertingPropertyResults
to lazy (git checkout step-2
)
- Steps needed to convert
PropertyResults.properties
to lazy- Pull down latest from
master
. This will set us up tillstep-2
- Convert
Property
data class fields to function equivalent - Convert
propertyContentResponse
inPropertyResultsService
to a lazy Coroutine - Pass in
Deferred
propertyContentResponse
and aDeferred
gaiaNeighborhoodResponse
toPropertiesAdapter.adapt
andProperty
await
on deferred responses at the appropriate place inProperty
class
- Pull down latest from