Skip to content

Commit

Permalink
feat: set default debounce timeout to 250ms
Browse files Browse the repository at this point in the history
This delays debounced requests, so we want to keep it fairly low
  • Loading branch information
matthieu-foucault committed Aug 21, 2020
1 parent 5487546 commit 284ee1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/lib/relay-environment/debounce-mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let debouncedMutation: {
timeoutId: number;
} = null;

const debounceMutationMiddleware = (timeout = 1000): Middleware => {
const debounceMutationMiddleware = (timeout = 250): Middleware => {
return (next) => async (req) => {
if (!(req instanceof RelayNetworkLayerRequest) || !req.isMutation()) {
if (debouncedMutation) {
Expand Down

0 comments on commit 284ee1d

Please sign in to comment.