Skip to content

Any optimization that I can do to improve execute_field performance? #4898

Answered by rmosolgo
junyuanz1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! There's an internal wrapper called RawValue which GraphQL-Ruby inserts without modification into the response whenever it's found:

when GraphQL::Execution::Interpreter::RawValue
# Write raw value directly to the response without resolving nested objects
set_result(selection_result, result_name, value.resolve, false, is_non_null)
HALT

You could try using that if you don't need any more GraphQL resolution. (But you have to handle _subfields, too, if there are any.) That's all I can think of!

To dig in further, please open an issue with some profiling data, for example: h…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by junyuanz1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants