diff --git a/codegen/testserver/generated.go b/codegen/testserver/generated.go index ea3c2f4854..34726a0087 100644 --- a/codegen/testserver/generated.go +++ b/codegen/testserver/generated.go @@ -9831,7 +9831,10 @@ func (ec *executionContext) _iIt_id(ctx context.Context, field graphql.Collected func (ec *executionContext) unmarshalInputInnerDirectives(ctx context.Context, obj interface{}) (InnerDirectives, error) { var it InnerDirectives - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -9873,7 +9876,10 @@ func (ec *executionContext) unmarshalInputInnerDirectives(ctx context.Context, o func (ec *executionContext) unmarshalInputInnerInput(ctx context.Context, obj interface{}) (InnerInput, error) { var it InnerInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -9893,7 +9899,10 @@ func (ec *executionContext) unmarshalInputInnerInput(ctx context.Context, obj in func (ec *executionContext) unmarshalInputInputDirectives(ctx context.Context, obj interface{}) (InputDirectives, error) { var it InputDirectives - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10013,7 +10022,10 @@ func (ec *executionContext) unmarshalInputInputDirectives(ctx context.Context, o func (ec *executionContext) unmarshalInputInputWithEnumValue(ctx context.Context, obj interface{}) (InputWithEnumValue, error) { var it InputWithEnumValue - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10033,7 +10045,10 @@ func (ec *executionContext) unmarshalInputInputWithEnumValue(ctx context.Context func (ec *executionContext) unmarshalInputNestedInput(ctx context.Context, obj interface{}) (NestedInput, error) { var it NestedInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10053,7 +10068,10 @@ func (ec *executionContext) unmarshalInputNestedInput(ctx context.Context, obj i func (ec *executionContext) unmarshalInputNestedMapInput(ctx context.Context, obj interface{}) (NestedMapInput, error) { var it NestedMapInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10073,7 +10091,10 @@ func (ec *executionContext) unmarshalInputNestedMapInput(ctx context.Context, ob func (ec *executionContext) unmarshalInputOuterInput(ctx context.Context, obj interface{}) (OuterInput, error) { var it OuterInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10093,7 +10114,10 @@ func (ec *executionContext) unmarshalInputOuterInput(ctx context.Context, obj in func (ec *executionContext) unmarshalInputRecursiveInputSlice(ctx context.Context, obj interface{}) (RecursiveInputSlice, error) { var it RecursiveInputSlice - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10113,7 +10137,10 @@ func (ec *executionContext) unmarshalInputRecursiveInputSlice(ctx context.Contex func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj interface{}) (SpecialInput, error) { var it SpecialInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { @@ -10133,7 +10160,10 @@ func (ec *executionContext) unmarshalInputSpecialInput(ctx context.Context, obj func (ec *executionContext) unmarshalInputValidInput(ctx context.Context, obj interface{}) (ValidInput, error) { var it ValidInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/example/config/generated.go b/example/config/generated.go index 4e985ada6b..a00b4fb177 100644 --- a/example/config/generated.go +++ b/example/config/generated.go @@ -1809,7 +1809,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputNewTodo(ctx context.Context, obj interface{}) (NewTodo, error) { var it NewTodo - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/example/fileupload/generated.go b/example/fileupload/generated.go index 9610785421..c53925c44b 100644 --- a/example/fileupload/generated.go +++ b/example/fileupload/generated.go @@ -1888,7 +1888,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputUploadFile(ctx context.Context, obj interface{}) (model.UploadFile, error) { var it model.UploadFile - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/example/scalars/generated.go b/example/scalars/generated.go index aa21a4bd1c..c819142b65 100644 --- a/example/scalars/generated.go +++ b/example/scalars/generated.go @@ -2146,7 +2146,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputSearchArgs(ctx context.Context, obj interface{}) (model.SearchArgs, error) { var it model.SearchArgs - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/example/starwars/generated/exec.go b/example/starwars/generated/exec.go index 3964d7f106..ed9e4a4760 100644 --- a/example/starwars/generated/exec.go +++ b/example/starwars/generated/exec.go @@ -3484,7 +3484,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputReviewInput(ctx context.Context, obj interface{}) (models.Review, error) { var it models.Review - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/example/todo/generated.go b/example/todo/generated.go index cb73c7c6c4..e1214fe3a6 100644 --- a/example/todo/generated.go +++ b/example/todo/generated.go @@ -1856,7 +1856,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputTodoInput(ctx context.Context, obj interface{}) (TodoInput, error) { var it TodoInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/example/type-system-extension/generated.go b/example/type-system-extension/generated.go index 2a8cc69338..ebc4b5727d 100644 --- a/example/type-system-extension/generated.go +++ b/example/type-system-extension/generated.go @@ -1874,7 +1874,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputTodoInput(ctx context.Context, obj interface{}) (TodoInput, error) { var it TodoInput - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } for k, v := range asMap { switch k { diff --git a/integration/generated.go b/integration/generated.go index 160d95ced5..0ff4474329 100644 --- a/integration/generated.go +++ b/integration/generated.go @@ -2013,7 +2013,10 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co func (ec *executionContext) unmarshalInputDateFilter(ctx context.Context, obj interface{}) (models.DateFilter, error) { var it models.DateFilter - var asMap = obj.(map[string]interface{}) + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } if _, present := asMap["timezone"]; !present { asMap["timezone"] = "UTC"