File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ A safe practice is to use trusted documents or a validation rule to ensure each
34
34
GraphQL executes in phases: validation, then execution. If validation fails or an authorization check blocks execution, uploaded
35
35
file streams may never be consumed. If your server buffers or retains these streams, it can cause memory leaks.
36
36
37
- To avoid this, consider writing incoming files to temporary storage immediately, and passing references (like filenames) into
37
+ To avoid this, ensure that all streams are terminated when the request finishes, whether or not they were consumed in resolvers.
38
+ An alternative to consider is writing incoming files to temporary storage immediately, and passing references (like filenames) into
38
39
resolvers. Ensure this storage is cleaned up after request completion, regardless of success or failure.
39
40
40
41
### Cross-Site Request Forgery (CSRF)
You can’t perform that action at this time.
0 commit comments