apollo-tooling icon indicating copy to clipboard operation
apollo-tooling copied to clipboard

Codegen should take @include and @skip into account

Open justinanastos opened this issue 6 years ago • 4 comments

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.

justinanastos avatar Jan 11 '19 20:01 justinanastos

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

bdrobinson avatar Jul 16 '19 13:07 bdrobinson

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!

justinanastos avatar Jul 22 '19 16:07 justinanastos

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?

eLysgaard avatar Mar 04 '20 12:03 eLysgaard

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.

toniihsia avatar Nov 03 '21 22:11 toniihsia