Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix [fieldSelection]: properly handle nullable fields #144

Closed
wants to merge 5 commits into from

Conversation

wellguimaraes
Copy link

@wellguimaraes wellguimaraes commented Nov 18, 2023

When fields are nullable, we end up trying to use FieldSelection with a first type param that extends null, and it causes a problem that makes anything beyond that field to be inferred as any.

Check the isolated issue on following Codesandbox:

Go to the end of the file and check the types of withIssue and fixed

https://codesandbox.io/p/sandbox/solitary-morning-jwkt3k?file=%2Fusage.ts%3A33%2C63

Copy link

vercel bot commented Nov 18, 2023

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 Nov 20, 2023 9:12pm

@remorses
Copy link
Owner

Thank you for the PR, i fixed in another commit making a different change

wellguimaraes pushed a commit to ReMatter/genql that referenced this pull request Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants