Merge pull request #377 from authorizerdev/fix-webhook-test-endpoint

fix: test webhook endpoint mutation
This commit is contained in:
Lakhan Samani 2023-08-02 00:04:55 +05:30 committed by GitHub
commit b028be3cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 5 deletions

View File

@ -118,7 +118,6 @@ const Webhooks = () => {
useEffect(() => {
fetchWebookData();
}, [paginationProps.page, paginationProps.limit]);
console.log({ webhookData });
return (
<Box m="5" py="5" px="10" bg="white" rounded="md">
<Flex margin="2% 0" justifyContent="space-between" alignItems="center">

View File

@ -2690,6 +2690,7 @@ input WebhookRequest {
input TestEndpointRequest {
endpoint: String!
event_name: String!
event_description: String
headers: Map
}
@ -16756,7 +16757,7 @@ func (ec *executionContext) unmarshalInputTestEndpointRequest(ctx context.Contex
asMap[k] = v
}
fieldsInOrder := [...]string{"endpoint", "event_name", "headers"}
fieldsInOrder := [...]string{"endpoint", "event_name", "event_description", "headers"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@ -16779,6 +16780,14 @@ func (ec *executionContext) unmarshalInputTestEndpointRequest(ctx context.Contex
if err != nil {
return it, err
}
case "event_description":
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("event_description"))
it.EventDescription, err = ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
case "headers":
var err error

View File

@ -301,9 +301,10 @@ type SignUpInput struct {
}
type TestEndpointRequest struct {
Endpoint string `json:"endpoint"`
EventName string `json:"event_name"`
Headers map[string]interface{} `json:"headers"`
Endpoint string `json:"endpoint"`
EventName string `json:"event_name"`
EventDescription *string `json:"event_description"`
Headers map[string]interface{} `json:"headers"`
}
type TestEndpointResponse struct {

View File

@ -512,6 +512,7 @@ input WebhookRequest {
input TestEndpointRequest {
endpoint: String!
event_name: String!
event_description: String
headers: Map
}