You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see the vanilla lacinia supports a :timeout-ms with the execute API, but I seem to have trouble configuring from lacinia-pedestal in a top-down style. Thanks in advance and thank you for this great library 🙏
The text was updated successfully, but these errors were encountered:
Although Lacinia provides a timeout option on executing queries (both in-thread and async), this is not exposed by lacinia-pedestal (which bypasses com.walmartlabs.lacinia/execute in any case).
This could be handled by the lacinia-pedestal handlers in some way, or by an async interceptor added to the interceptor chain.
Adding a timeout is not difficult (following the pattern in lacinia); for the in-thread case, it's about linking the ResolverResult to a promise, and adding a timeout to the deref; for async, it needs an alt! or some such.
However, I'm not quite sure what the right behavior is when an operation does in fact time out; perhaps we should just throw an exception and applications can add interceptors to catch that exception and deal with it in an application-appropriate way.
I'm going to direct Slack here for a discussion.
hlship
changed the title
Help on setting resolver timeout
There isn't a way to set a timeout on query execution
Aug 12, 2022
I see the vanilla lacinia supports a :timeout-ms with the
execute
API, but I seem to have trouble configuring from lacinia-pedestal in a top-down style. Thanks in advance and thank you for this great library 🙏The text was updated successfully, but these errors were encountered: