genql icon indicating copy to clipboard operation
genql copied to clipboard

Fix issue in typeSelection.ts when handling nullable non-scalars

Open olee opened this issue 1 year ago • 4 comments

When using this library, I notices some strange issues with the output types when relations were not marked as required.

Will try to provide a full example of a schema plus the broken typings the unmodified / modified variants generate later if required.

olee avatar Mar 08 '24 03:03 olee

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
genql ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2024 3:04am

vercel[bot] avatar Mar 08 '24 03:03 vercel[bot]

Can you add an example here? https://github.com/remorses/genql/blob/master/integration-tests/schema.graphql

And a test here if possible https://github.com/remorses/genql/blob/master/integration-tests/tests/execution.ts

To run test go inside integration-tests and run pnpm gen && pnpm test

remorses avatar Mar 08 '24 10:03 remorses

Will see if I can add those soon, thx.

olee avatar Mar 15 '24 12:03 olee

Even just the graphql schema is enough, I can add tests myself

remorses avatar Mar 15 '24 13:03 remorses