Skip to the content.

Table of contents

  1. Getting started
  2. Documentation
  3. Contributing

getCallWebhook

This function initializes and returns callWebhook by assigning it getMetadataFormContext function.

Params :

callWebhook

Function to call webhook.

How it works :

Params :

getMetadataFromContext

The purpose of this function is to return the security parameters of a webhook from a context. (It’s called when you fetch a webhook)

Example :

const { getApolloServer } = require('graphql-web-hook')

...

getApolloServer({
  ...
  getMetadataFromContext: (context) => {
    return getUserIdFromContext(context)
  }
})

Previous: Getting started

Next: Contributing


Teamstarter’s other libraries