0no-co / gql.tada

🪄 Magical GraphQL query engine for TypeScript
https://gql-tada.0no.co
MIT License
2.45k stars 36 forks source link

fix: Ensure TS excess property error can be triggered by `graphql.scalar` #243

Closed kitten closed 3 months ago

kitten commented 3 months ago

Related #242

Summary

TypeScript is able to trigger error 2353 (“object literals may only specify known properties”) in certain scenarios, when it's obvious to it whether an object literal type has a known set of properties that are accepted.

This fix makes sure that graphql.scalar() triggers this check correctly instead of expanding the value argument type.

Set of changes

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 7022d9fd6f7e23f3ef02ccc3d5cbbabaa95e60dc

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR