Pārlūkot izejas kodu

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

Ivan Asmer 5 gadi atpakaļ
vecāks
revīzija
4b2267754b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      expand.js

+ 2 - 2
expand.js

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