소스 검색

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

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

+ 1 - 1
expand.js

@@ -80,10 +80,10 @@ function mmExpandSchema(gqlSchema){
                         type: GraphQLInt,
                         args: {query: {type: GraphQLString}},
                         async resolve(root, args, context, info){
-                            console.log(root, args, context, info)
                             q = JSON.parse(args.query)
                             q[1] = q[1] || {}
                             q[1].count = []
+                            console.log(q)
                             args.query = JSON.stringify(q)
                             return find.resolve(root, args, context, info)
                         }