graffle-js / graffle

Simple GraphQL Client for JavaScript. Minimal. Extensible. Type Safe. Runs everywhere.
http://graffle.js.org/
MIT License
5.89k stars 310 forks source link

Results are not typed #1106

Open sorenhoyer opened 2 months ago

sorenhoyer commented 2 months ago

Screenshot

image

Description

Neither when I generate a client from introspecting a graphql api endpoint or if I refer to codegen created types, do I get the correct type back in the result. It only gives ConditionalSimplify<T, Error>

jasonkuhrt commented 2 months ago

Can you share a repro?

jasonkuhrt commented 2 months ago

Hey, if this is still an issue in the latest version please let me know. Thanks for your feedback and trying Graffle.

sorenhoyer commented 2 months ago

Hey, if this is still an issue in the latest version please let me know. Thanks for your feedback and trying Graffle.

Well iit's just that on the screenshot above. graphql-codegen types or manually typing does not give me back a typed result.

Just tried with the generated client and got the same

image

jasonkuhrt commented 2 months ago

I need a failing case. Examples in this repo are not failing. Can you share your GraphQL schema and typescript config?