Explorar o código

scoper on find query.by default adds limit 100

Ivan Asmer %!s(int64=5) %!d(string=hai) anos
pai
achega
9af4253c96
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      expand.js

+ 2 - 2
expand.js

@@ -1,10 +1,10 @@
 const { buildSchema, GraphQLObjectType, GraphQLString, GraphQLInt, GraphQLList, GraphQLSchema } = require('graphql');
 const ObjectID    = require("mongodb").ObjectID;
 const bound       = 100;
-function scoper      (query,cursorCalls=[{},{limit:[limitValue=100]}]) {
+function scoper(query,cursorCalls=[{},{limit:[limitValue=100]}]) {
     console.log(limit)
     return params
-};
+}
 function mmExpandSchema(gqlSchema, defaultQueryFields, defaultMutationFields, scoper=scoper){
     const types    = {}
     const _typeMap = gqlSchema.getTypeMap()