Replies: 1 comment
-
This is really a maintenance problem. We have some more use-cases pending for The underlying problem is that while we've tried non-overload patterns, they're simply not as performant for TypeScript to evaluate for this specific case, or don't represent the API we want. So, we'll need some time to find some alternatives and/or also check the implications of adding a huge amount of overloads (in terms of inference performance as well) before adding more cases. This said, just to point this out. These are all helpers. There's nothing stopping you from calling |
Beta Was this translation helpful? Give feedback.
-
I have a question regarding the type definition of the
readFragment
function. I noticed that there are no specific overloads for handling arrays that might be null or undefined.Currently, the type definition includes:
gql.tada/src/api.ts
Lines 554 to 557 in 010a4f3
However, it doesn't include overloads for the following cases:
I'm wondering if this is the expected behavior or if these cases were intentionally omitted.
For context, I'm in the process of migrating from
@graphql-codegen
togql.tada
, and I encountered type errors due to this difference in type definitions.Beta Was this translation helpful? Give feedback.
All reactions