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

GraphQLResponse.getRequestDetails should return nullable #1957

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

Emily
Copy link
Contributor

@Emily Emily commented Jul 10, 2024

It can return null, so ought to have ? so that folks using this from Kotlin don't end up with NPEs unexpectedly.

@paulbakker
Copy link
Collaborator

While you're correct that it should be nullable, this is a painful change to make. It will effectively fail compilation for every Kotlin app using this API. Simple fix, but quite annoying, specially for a non-major release.

@Emily
Copy link
Contributor Author

Emily commented Jul 11, 2024

@paulbakker true, though we've had at least one internal use get bitten by this. I think the minor annoyance of having to either add !! in a bunch of places, or actually properly null check is worth it.

@Emily Emily merged commit 688a5db into master Jul 11, 2024
3 checks passed
@Emily Emily deleted the ejd-change-kotlin-nullability branch July 11, 2024 16:41
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