graphql-editor / graphql-zeus

GraphQL client and GraphQL code generator with GraphQL autocomplete library generation ⚡⚡⚡ for browser,nodejs and react native ( apollo compatible )
https://graphqleditor.com/docs/zeus
MIT License
1.95k stars 106 forks source link

Feature Request: Type errors on excess arguments #396

Open madsbuch opened 7 months ago

madsbuch commented 7 months ago

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 commented 6 months ago

In 5.4.0 it is better but arguments are still a challenge