Open dwwoelfel opened 4 years ago
This solves a problem we saw at OneGraph when upgrading to the latest version of ocaml-graphql-server.
Our query times increased by ~60ms on every query after upgrading. We tracked down the cause to this commit https://github.com/andreas/ocaml-graphql-server/commit/b187eaa15046e8fc01b111a8ac4791d6c92a0e3b, which calls types_of_schema on every call to execute. We have a lot of types, so it added a noticeable amount of latency.
types_of_schema
execute
With this change, types_of_schema is calculated only once when you construct the schema.
This solves a problem we saw at OneGraph when upgrading to the latest version of ocaml-graphql-server.
Our query times increased by ~60ms on every query after upgrading. We tracked down the cause to this commit https://github.com/andreas/ocaml-graphql-server/commit/b187eaa15046e8fc01b111a8ac4791d6c92a0e3b, which calls
types_of_schema
on every call toexecute
. We have a lot of types, so it added a noticeable amount of latency.With this change,
types_of_schema
is calculated only once when you construct the schema.