fix: test webhook endpoint mutation

Resolves #376
This commit is contained in:
Lakhan Samani 2023-08-02 00:04:07 +05:30
parent fab3c2f87e
commit 9a8d20b698
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

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

View File

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