This is a simple example of how to use the dynamic-schema feature of async-graphql.
The objective of this example is to minimize the size of the generated binary file.
Static Schema (B) | Dynamic Schema (B) | commit | |
---|---|---|---|
hello world | 453,008 | 453,008 | e4aa02e |
1 query | 1,251,728 | 1,280,400 | 304b7b2 |
100 query (macro) | 1,493,392 | 1,554,832 | a292e6b & e81085b |
100 query + 100 object (macro) | 2,673,040 | 1,747,344 | dfef603 |
100 query + 100 object (dynamic definition) | - | 1,304,976 | b16b9d6 |
the performance affect is not significant when dynamic-schema is used.
Static Schema (dur/100 k req) | Dynamic Schema (dur/100 k req) | |
---|---|---|
100 query + 100 object (dynamic definition) | 1.190s | 1.250s |