This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* React hook to execute an Apollo query and keep the data up to date according | |
* what's newest on the cache. | |
* | |
* @param { DocumentNode } query: the GraphQL query you want to run | |
* @param { Object } variables: the variables you want to interpolate on the query | |
* Note: you may want to memoize your object to prevent the query to run multiple times. | |
* | |
* Read more about param types on Apollo's watchQuery docs: | |
* https://www.apollographql.com/docs/react/api/apollo-client/#ApolloClient.watchQuery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap 'handle_signal SIGINT' SIGINT | |
trap 'handle_signal SIGQUIT' SIGQUIT | |
trap 'handle_signal SIGTERM' SIGTERM | |
trap 'handle_signal SIGHUP' SIGHUP | |
trap 'handle_signal SIGKILL' SIGKILL # we can't handle this | |
handle_signal() { | |
echo "received: $1. Exiting..." |
OlderNewer