Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

totalCount function "args" are not typed based on "additionalArgs" in the same way as "nodes" function #1160

Open
Bernold1 opened this issue May 23, 2023 · 0 comments

Comments

@Bernold1
Copy link

Bernold1 commented May 23, 2023

When using the connectionPlugin total count:

import { connectionPlugin } from 'nexus'

    connectionPlugin({
      cursorFromNode: (node) => node.id,
      disableBackwardPagination: true,
      extendConnection: {
        totalCount: { type: nonNull('Int'), requireResolver: false },
      },
    }),

args have no inferred type in totalCount, which results in typing errors, which are only resolved when casting the args to any or using @ts-ignore. Is there a workaround to this, or is this potentially a known bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant