aPureBase / KGraphQL

Pure Kotlin GraphQL implementation
https://kgraphql.io
MIT License
307 stars 58 forks source link

Error in example code for data loaders in documentation #183

Open StefanLiebig opened 2 years ago

StefanLiebig commented 2 years ago

I think there is a minor error in the example code.

This

ExecutionResult.Success(people[it-1])

will not create the "null" values in the result of the query but a runtime error. Replacing this line with

ExecutionResult.Success(people.getOrNull(it - 1))

will do.

Using Kotlin 1.6.10