
Show HN: GraphQL at the Edge - Elof
https://github.com/stackpath/edgeengine-examples/tree/master/graphql
======
scjody
So instead of running

    
    
      curl 'https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400&date=today'

I can deploy a bunch of code and then run

    
    
      curl -X POST -H "Content-Type: application/json" --data '{ "query": "{ hello, sun(lat: 36.7201600, long: -4.4203400, date: \"today\") { sunrise, sunset } }" }' <script-url>
    

Can someone explain why this is useful?

~~~
Elof
Part of the benefit of edge implementations of serverless is that the scripts
are deployed globally over a managed network. So deploying on the edge
distributes the gateway as close to the user as possible (in this case IXs in
major metro areas) and manages all of the traffic routing and loadbalancing.
Which _almost always_ improves performance compared to a more traditional
cloud implementation

