ExtraBB / typegoose-cursor-pagination

A mongoose plugin for cursor pagination with typegoose support
MIT License
17 stars 10 forks source link

BSON response in docs #24

Closed koolamusic closed 2 years ago

koolamusic commented 3 years ago

Hi thanks for this plugin, I am running into an issue where I am not sure what to call this error

{

    "result": {
        "docs": [
            [
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    43,
                                    140,
                                    183,
                                    101,
                                    166,
                                    97,
                                    56,
                                    93,
                                    123,
                                    167
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    43,
                                    140,
                                    183,
                                    101,
                                    166,
                                    97,
                                    56,
                                    93,
                                    123,
                                    167
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "incidiggdugntut anim occaecat",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                },
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    45,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    157
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    45,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    157
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "incidigghdugntut anim occaecat",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                },
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    51,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    158
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    51,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    158
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "8899 anim occaecat",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                },
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    56,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    159
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    56,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    159
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "8899 anim occaeca97t",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                },
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    59,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    160
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    59,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    160
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "8899 anim occ7aeca97t",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                },
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    63,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    161
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    63,
                                    66,
                                    23,
                                    40,
                                    97,
                                    213,
                                    175,
                                    167,
                                    161
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "8899 anim occ7aec7878a97t",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                },
                {
                    "$__": {
                        "strictMode": true,
                        "selected": {},
                        "getters": {},
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    95,
                                    223,
                                    161,
                                    99,
                                    97,
                                    254,
                                    43,
                                    7,
                                    144
                                ]
                            }
                        },
                        "wasPopulated": false,
                        "activePaths": {
                            "paths": {
                                "userId": "init",
                                "invitedBy": "init",
                                "inviteStatus": "init",
                                "subscriberId": "init",
                                "_id": "init",
                                "__v": "init"
                            },
                            "states": {
                                "ignore": {},
                                "default": {},
                                "init": {
                                    "_id": true,
                                    "inviteStatus": true,
                                    "subscriberId": true,
                                    "userId": true,
                                    "invitedBy": true,
                                    "__v": true
                                },
                                "modify": {},
                                "require": {}
                            },
                            "stateNames": [
                                "require",
                                "modify",
                                "init",
                                "default",
                                "ignore"
                            ]
                        },
                        "pathsToScopes": {},
                        "cachedRequired": {},
                        "session": null,
                        "$setCalled": [],
                        "emitter": {
                            "_events": {},
                            "_eventsCount": 0,
                            "_maxListeners": 0
                        },
                        "$options": {
                            "skipId": true,
                            "isNew": false,
                            "willInit": true,
                            "defaults": true
                        }
                    },
                    "isNew": false,
                    "$locals": {},
                    "$op": null,
                    "_doc": {
                        "inviteStatus": false,
                        "_id": {
                            "_bsontype": "ObjectID",
                            "id": {
                                "type": "Buffer",
                                "data": [
                                    96,
                                    169,
                                    44,
                                    95,
                                    223,
                                    161,
                                    99,
                                    97,
                                    254,
                                    43,
                                    7,
                                    144
                                ]
                            }
                        },
                        "subscriberId": "sint lfgaboris",
                        "userId": "cc7aec7878a97t",
                        "invitedBy": "Lorem cupidatat",
                        "__v": 0
                    },
                    "$init": true
                }
            ]
        ]
    }
}
koolamusic commented 3 years ago

Also I am at the bleeding edge of @typegoose-next can I send a PR to update to the beta version of Typegoose?

ExtraBB commented 2 years ago

All dependencies are now updated, can you check if this issue is still relevant?