Hacker News new | ask | show | jobs
by dwwoelfel 1922 days ago
You can do this with OneGraph (https://www.onegraph.com) via our `poll` subscription.

Here's an example query that will poll an npm package and send a payload whenever the latest version changes.

https://www.onegraph.com/graphiql?shortenedId=FYH1SY

  subscription PollNpmPackage {
    poll(
      webhookUrl: "https://example.com"
      onlyTriggerWhenPayloadChanged: true
      schedule: { every: { minutes: 60 } }
    ) {
      query {
        npm {
          package(name: "graphql") {
            distTags {
              latest {
                versionString
              }
            }
          }
        }
      }
    }
  }
This is just an illustrative example. I used NPM because it doesn't require any authorization. We also support proper subscriptions for NPM that listen to their couchdb change feed.
1 comments

This is very cool! I'll take a better look at what you do tomorrow!