소스 검색

+count to give ability get count via graphql when result type isnt array but Int

Ivan Asmer 5 년 전
부모
커밋
c6dd3176c2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      expand.js

+ 1 - 1
expand.js

@@ -84,7 +84,7 @@ function mmExpandSchema(gqlSchema){
                             args = JSON.parse(args.query)
                             args[1] = args[1] || {}
                             args[1].count = []
-                            return find.resolve(root, args, context, info)
+                            return find.resolve(root, JSON.stringify(args), context, info)
                         }
                     }
                     queryFields[`${outputTypeName}Count`] = count