Skip to content

Commit d9300c4

Browse files
authored
Merge pull request #4890 from agrobbin/ar-operation-store-guide-test-note
add a note to the Operation Store AR guide about test environments
2 parents fe83e38 + e3fafa9 commit d9300c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

guides/operation_store/active_record_backend.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,10 @@ use GraphQL::Pro::OperationStore, update_last_used_at_every: 1 # seconds
9393
```
9494

9595
To update that column inline each time an operation is accessed, pass `0`.
96+
97+
**Note:** It is recommended to set this to `0` in test environments, to avoid delayed updates in another thread that can cause intermittent test hangs and failures. For example:
98+
99+
```ruby
100+
# Update immediately in Test, wait 5 seconds in other environments:
101+
use GraphQL::Pro::OperationStore, update_last_used_at_every: Rails.env.test? ? 0 : 5
102+
```

0 commit comments

Comments
 (0)