tendant / graphql-clj

A Clojure library that provides GraphQL implementation.
Eclipse Public License 1.0
285 stars 22 forks source link

Post validation transformations #44

Closed aew closed 7 years ago

aew commented 7 years ago

Various bugfixes and optimizations:

Addresses:

Related:

aew commented 7 years ago

Validated statement output should now be roughly equivalent in size to the parsed data structure

aew commented 7 years ago

The changes to the executor in this PR have the following impact on execution runtime performance:

version 1.19.0 with memoization

Evaluation count : 1479300 in 60 samples of 24655 calls.
             Execution time mean : 41.074870 µs
    Execution time std-deviation : 649.450286 ns
   Execution time lower quantile : 40.055590 µs ( 2.5%)
   Execution time upper quantile : 42.387063 µs (97.5%)

version 1.20.0-SNAPSHOT with memoization

Evaluation count : 4248660 in 60 samples of 70811 calls.
             Execution time mean : 14.944263 µs
    Execution time std-deviation : 575.873227 ns
   Execution time lower quantile : 14.091584 µs ( 2.5%)
   Execution time upper quantile : 16.059733 µs (97.5%)

version 1.20.0-SNAPSHOT with memoization and inline resolver functions

Evaluation count : 6908580 in 60 samples of 115143 calls.
             Execution time mean : 8.915279 µs
    Execution time std-deviation : 160.062685 ns
   Execution time lower quantile : 8.687222 µs ( 2.5%)
   Execution time upper quantile : 9.306784 µs (97.5%)

From: https://github.com/xsc/graphql-clj-bench/pull/2

tendant commented 7 years ago

Found a bug: https://github.com/tendant/graphql-clj-starter/tree/testing-validation-loc

Required List field has wrong kind :OBJCET instead of :LIST.

xsc commented 7 years ago

@tendant Stuff like that should probably be verified within the inteospection unit tests, right?

aew commented 7 years ago

I've fixed this bug, and added some unit test cases.

tendant commented 7 years ago

Super. I will test it and merge it soon.