fix: handle different response

This commit is contained in:
Lakhan Samani
2022-07-17 17:05:35 +05:30
parent 70ea463f60
commit 882756ef3a
5 changed files with 9 additions and 19 deletions

View File

@@ -1966,7 +1966,7 @@ type WebhookLog {
type TestEndpointResponse {
http_status: Int64
response: Map
response: String
}
type WebhookLogs {
@@ -7292,9 +7292,9 @@ func (ec *executionContext) _TestEndpointResponse_response(ctx context.Context,
if resTmp == nil {
return graphql.Null
}
res := resTmp.(map[string]interface{})
res := resTmp.(*string)
fc.Result = res
return ec.marshalOMap2map(ctx, field.Selections, res)
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *model.User) (ret graphql.Marshaler) {

View File

@@ -228,8 +228,8 @@ type TestEndpointRequest struct {
}
type TestEndpointResponse struct {
HTTPStatus *int64 `json:"http_status"`
Response map[string]interface{} `json:"response"`
HTTPStatus *int64 `json:"http_status"`
Response *string `json:"response"`
}
type UpdateAccessInput struct {

View File

@@ -177,7 +177,7 @@ type WebhookLog {
type TestEndpointResponse {
http_status: Int64
response: Map
response: String
}
type WebhookLogs {

View File

@@ -173,7 +173,5 @@ func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResol
// Query returns generated.QueryResolver implementation.
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
type (
mutationResolver struct{ *Resolver }
queryResolver struct{ *Resolver }
)
type mutationResolver struct{ *Resolver }
type queryResolver struct{ *Resolver }