feat: add tests for webhook resolvers

This commit is contained in:
Lakhan Samani
2022-07-11 19:40:54 +05:30
parent 334041d0e4
commit 018a13ab3c
24 changed files with 381 additions and 31 deletions

View File

@@ -145,5 +145,17 @@ func (p *provider) DeleteWebhook(ctx context.Context, webhook *model.Webhook) er
if err != nil {
return err
}
query := fmt.Sprintf("FOR d in %s FILTER d.event_id == @event_id REMOVE { _key: d._key }", models.Collections.WebhookLog)
bindVars := map[string]interface{}{
"event_id": webhook.ID,
}
cursor, err := p.db.Query(ctx, query, bindVars)
if err != nil {
return err
}
defer cursor.Close()
return nil
}