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

Feature Request: Type errors on excess arguments #396

Open
madsbuch opened this issue Apr 30, 2024 · 1 comment
Open

Feature Request: Type errors on excess arguments #396

madsbuch opened this issue Apr 30, 2024 · 1 comment

Comments

@madsbuch
Copy link

Hi!

First and foremost, thanks for at great library! We use it extensively to provide a TS-native experience when querying our graphQl backend.

We do have one issue though: It would be nice to see type errors when we try to supply and argument to a query and mutation that does not exists:

const resp = await graphQlClient('mutation')({
    createFormSubmission: [
    {
        nonExistingVar: "This should give a type error"
    }, { ... }
    ]
})

When refactoring, we rely on typescript to tell us where we forgot to make changes. This small update would give a huge value in this process.

@aexol
Copy link
Collaborator

aexol commented May 6, 2024

In 5.4.0 it is better but arguments are still a challenge

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

2 participants