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

Codegen should take @include and @skip into account #888

Open
justinanastos opened this issue Jan 11, 2019 · 5 comments
Open

Codegen should take @include and @skip into account #888

justinanastos opened this issue Jan 11, 2019 · 5 comments
Labels
🤖 component - codegen related to the codegen core packages

Comments

@justinanastos
Copy link
Contributor

If we use @include or @skip directives on a non-nullable field, the code generation output should be nullable because we can guarantee that the data won't always exist.

@JakeDawkins JakeDawkins added the 🤖 component - codegen related to the codegen core packages label Jul 9, 2019
@bdrobinson
Copy link

This would be really useful. If it'd be an easy PR I'm happy to have a go?

@justinanastos
Copy link
Contributor Author

This would be really useful. If it'd be an easy PR I'm happy to have a go?

Would love some help on this!

@eLysgaard
Copy link

This would be super useful! The @include directive trivialises a problem I'm dealing with but since I can't generate proper types using it I'm hesitant to use it.

Could anyone point me in the right direction if I'd want to help out with resolving this?

@toniihsia
Copy link

toniihsia commented Nov 3, 2021

This would still be extremely useful! Without the proper types, we get incorrect signal on whether we need to check for undefined/null which can cause unexpected bugs.

Would be happy to help contribute to this resolution.

@TSMMark
Copy link
Contributor

TSMMark commented Oct 22, 2024

Anyone found a solution for having the typescript types be generated as nullable types when using directives?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 component - codegen related to the codegen core packages
Projects
None yet
6 participants