Skip to content

feat(wrap): allow making the new field type Nullable #1150

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

Conversation

MkMan
Copy link
Contributor

@MkMan MkMan commented May 23, 2025

Description

Allow providing an optional configuration object to control the nullability of the new Wrapper field.

Why

While recently investigating an incident we suffered I discovered that fields Wrapped under a new field are automatically marked as required (NonNull).

In our case this caused a problem because the fields were from an external stitched schema and when the API returned null our service crashed as it expected something back.

Comments

I couldn't find contributing guidelines so please provide me any feedback needed to make this change in a way that aligns with the repo's standards and direction.

Many thanks 😃

@MkMan MkMan force-pushed the allow-specifying-field-nullability-when-wrapping branch 3 times, most recently from 802e2da to aeb54c3 Compare May 26, 2025 04:04
Copy link
Member

@enisdenjo enisdenjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good! Just please create a changeset using yarn changeset to get this ready for release. Thanks!

@MkMan MkMan force-pushed the allow-specifying-field-nullability-when-wrapping branch from aeb54c3 to 8b993f1 Compare May 26, 2025 23:37
@MkMan MkMan requested a review from enisdenjo May 26, 2025 23:41
@MkMan
Copy link
Contributor Author

MkMan commented May 26, 2025

This is looking good! Just please create a changeset using yarn changeset to get this ready for release. Thanks!

Done, thanks for reviewing it @enisdenjo 🙂

@enisdenjo enisdenjo merged commit 4a80de1 into graphql-hive:main May 27, 2025
40 of 41 checks passed
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