0no-co / gql.tada

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

fix: Prevent `readFragment` from falling back to `any` return types #216

Closed kitten closed 4 months ago

kitten commented 4 months ago

Resolves #215

Summary

This prevents readFragment(data) from falling back to any as a return type when no generic was passed. It also prevents readFragment(document, data) to evaluate to any when an invalid document is passed. This already errored previously on the document argument, but now also prevents any from being returned.

Set of changes

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 1f0b480d447f3ba76c897a08884f7eb3e9c4f99c

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