Skip to the content
Documentation

[GraphQLWebhooks]

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

The group [GraphQLWebhooks] of settings/graphql.ini.

File

settings/graphql.ini; override it in settings/override/graphql.ini.append.php, in a siteaccess or in an extension.

Settings

Setting Default Description
EndpointList[] (empty array) The webhooks: every event of the journal an end point asks for is POSTed to it as JSON, signed with HMAC-SHA-256 (X-Exponential-Signature: sha256=<hex of HMAC(secret, X-Exponential-Timestamp + "." + body)>), by the cronjob part graphqlwebhooks (also in the frequent group) or ./console exp:graphql:webhooks --deliver; never by the request that changed the content. Add them with ./console exp:graphql:webhooks --add=<name> --url=<https://...> --apply, or in Setup > GraphQL: both write settings/override/graphql.ini.append.php and keep the signing secret in the secret store. The end points, each with its block [GraphQLWebhook_<name>]: [GraphQLWebhook_shop] URL=https://shop.example.com/hooks/exponential # the events it wants: publish, update, trash, delete, move, hide, reveal, mutation; none: every event Events[]=publish Events[]=update # only content below the root node of these siteaccesses, in their languages; none: every siteaccess SiteAccessList[]=eng # only these classes; none: every class ClassList[]=article # only content at or below these nodes; none: the whole tree SubtreeList[]=2 # the NAME of the signing secret in the secret store (Setup > Secrets), or env:VARIABLE; the value is never written # into a settings file. Default: graphql.webhook.<name> Secret=graphql.webhook.shop # event (the default): the event and its ids; query: the answer of a persisted query (Query, its name or SHA-256) # with the variables objectId, nodeId, version, language and event, run as QueryUser (a login; default anonymous) Payload=event Query= QueryUser= # disabled keeps the end point but sends it nothing Enabled=enabled
Timeout 10 Seconds an end point has to answer; a 2xx answer delivers, anything else is tried again.
MaxAttempts 8 Tries per delivery; then it is kept in var/<site>/graphql/webhooks/failed/ and the delivery log says so.
RetryBackoff 30 Seconds before the second try, doubled for each try after it, at most MaxBackoff.
MaxBackoff 3600  
BatchSize 200 Deliveries sent per run at most.
LogMaxBytes 1M The delivery log (var/<site>/graphql/webhooks/deliveries.jsonl) is kept as deliveries.1.jsonl past this size.

See also

Generated example: graphql.ini [GraphQLWebhooks]

Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this group. The descriptions are the comment lines of settings/graphql.ini.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.