Skip to content

Instantly share code, notes, and snippets.

View samhatoum's full-sized avatar

Sam Hatoum samhatoum

View GitHub Profile
@codecitizen
codecitizen / serverless.yml
Created November 22, 2018 20:42
A serverless.yml file configuring a AWS ElastiCache redis instance that is accessible by all AWS Lambda functions deployed by this serverless function.
service: my-service
provider:
name: aws
runtime: nodejs8.10
stage: ${opt:stage, 'dev'}
environment:
REDIS_HOST:
"Fn::GetAtt": [ElasticCacheCluster, RedisEndpoint.Address]
functions:
@samhatoum
samhatoum / chrome-driver-troubleshooting.sh
Last active November 8, 2019 10:05
Troubleshoot / Debug Chromedriver Issues
# First start chromedriver from the console like this
chromedriver --url-base=wd/hub --verbose
# Then in another tab / window: issue a command to start a new chrome session via the JSON protocol
curl -XPOST http://localhost:9515/wd/hub/session -d '{"desiredCapabilities":{"browserName":"chrome"}}'
# If you can see a chrome window pop up, you're all set. If not, check the chromedriver output and fix your issue
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active February 24, 2024 04:41
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.