fix: allow teamLead field to be nullable in VisitResolver - #1743
Open
jekabs-karklins wants to merge 2 commits into
Open
fix: allow teamLead field to be nullable in VisitResolver#1743jekabs-karklins wants to merge 2 commits into
jekabs-karklins wants to merge 2 commits into
Conversation
jekabs-karklins
requested review from
SourangshuSTFC
and removed request for
a team
August 24, 2026 14:21
yoganandaness
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes the 'teamLead' field nullable in 'VisitResolver'.
Motivation and Context
In the database the team lead always exists — the column is NOT NULL. The nullability here is about the read path, not the data model: teamLead resolves through getBasic, which returns null when the requesting user lacks permission to read that user's details.
While the field was non-nullable, that null triggered GraphQL's non-null propagation: the error bubbles up to the nearest nullable ancestor, Experiment.visit, and removes the entire visit object from the response. A single unreadable team lead therefore made the visit look as though it didn't exist, which is a far larger side effect than the missing field itself.
Making the field nullable confines the loss to the field that's actually restricted.
Changes
How Has This Been Tested?
Fixes Jira Issue
https://jira.ess.eu//browse/
Depends On
Tests included/Docs Updated?