Skip to content

Conversation

@DrPowerSlam
Copy link
Contributor

@DrPowerSlam DrPowerSlam commented Oct 29, 2025

#2723

  • Added or updated tests
  • Documented user facing changes
  • Updated CHANGELOG.md

Changes

Changes the condition type of HAS arguments in @whereConditions to always use String type, so the column type isn't inherited from the parent node.

Breaking changes

Technically this is a breaking change, since users that currently use the unupdated code will go from an Enum type to a String type.
However, I would argue that it's almost impossible to correctly use the current functionality, since you need a perfect overlap between columns in a node and all its relations to make it work.

spawnia and others added 4 commits January 13, 2026 16:17
- Rename DEFAULT_WHERE_HAS_CONDITIONS to DEFAULT_HAS_CONDITION for
  cleaner type names (WhereConditionsHasCondition vs
  WhereConditionsWhereHasConditions)
- Rename createWhereHasConditionsInputType to createHasConditionInputType
- Add tests for nested HAS conditions and AND/OR combinations
- Clarify CHANGELOG entry as a fix

Co-Authored-By: Claude <[email protected]>
…here-has-condition

# Conflicts:
#	CHANGELOG.md
- Delegate createHasConditionInputType to createWhereConditionsInputType
  to eliminate code duplication (37 lines reduced to 6)
- Replace assert() with $this->assertInstanceOf() for PHPUnit consistency

Co-Authored-By: Claude <[email protected]>
The delegation to createWhereConditionsInputType caused incorrect type
references. Keep methods separate for clarity and correctness.

Co-Authored-By: Claude <[email protected]>
@spawnia spawnia merged commit e3a8509 into nuwave:master Jan 13, 2026
62 checks passed
@spawnia
Copy link
Collaborator

spawnia commented Jan 13, 2026

Released with https://github.com/nuwave/lighthouse/releases/tag/v6.64.2, thank you

@oortasertecfarma
Copy link

This ended up being a breaking change for my project, despite being released as a patch.
Might be worth at least a minor bump to better match semver expectations.

@spawnia
Copy link
Collaborator

spawnia commented Jan 16, 2026

@oortasertecfarma How did this break your project? I was inclined to agree with @DrPowerSlam assessment:

it's almost impossible to correctly use the current functionality, since you need a perfect overlap between columns in a node and all its relation

@Saarnaki
Copy link

@oortasertecfarma How did this break your project? I was inclined to agree with @DrPowerSlam assessment:

it's almost impossible to correctly use the current functionality, since you need a perfect overlap between columns in a node and all its relation

Can't speak for @oortasertecfarma , but this was a breaking change for me as well. This increased the cached schema file size from 17mb to 21mb, which caused memory exhaustion errors in ASTCache.php fromCacheOrBuild method, line 64, while reading the cache file.

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.

4 participants