graphql-compose / graphql-compose/graphql-compose-mongoose

`sort` enum arg is being passed in as empty object

Open
#443 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
706
Forks
98
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use the `sort` arg on a `findMany` query but it's not working as expected:

GraphQL query:
```
noteMany(sort: $sort) {
_id
}
```
Variables:
```
{
"sort": "_ID_DESC",
}
```

Upon inspection in the `wrapResolve` function and console logging `rp`, I'm seeing that the `sort` arg is coming in as an empty object:
```
{
source: undefined,
args: { limit: 100, sort: String {} },
...
```

Anyone have any idea on how to fix this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.