Skip to content

Commit eff800a

Browse files
committed
refactoring mutation rewriter
1 parent 321f4c8 commit eff800a

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

graphql/resolve/mutation_rewriter.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -995,17 +995,11 @@ func rewriteObject(
995995
if xid != nil {
996996
if xidVal, ok := obj[xid.Name()]; ok && xidVal != nil {
997997
switch xid.Type().Name() {
998-
case "Int!":
999-
fallthrough
1000-
case "Int":
998+
case "Int!", "Int":
1001999
xidString = strconv.FormatInt(xidVal.(int64), 10)
1002-
case "Float!":
1003-
fallthrough
1004-
case "Float":
1000+
case "Float!", "Float":
10051001
xidString = strconv.FormatFloat(xidVal.(float64), 'f', -1, 64)
1006-
case "Int64!":
1007-
fallthrough
1008-
case "Int64":
1002+
case "Int64!", "Int64":
10091003
fallthrough
10101004
default:
10111005
xidString, ok = xidVal.(string)

0 commit comments

Comments
 (0)