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

FEATURE: Add findByCriteria and findByIdentifier flowQuery operation #5435

Draft
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Jan 10, 2025

findByCriteria allows to query the subgraph below the each contextNode
arguments:

  • string | null: nodeTypefilter
  • string | null: propertyValueCriteria
  • object{offset?:int, limit?:int} | null: pagination

findByIdentifier will find a node with the given aggregate id in the subgraph of each contextNode
arguments:

  • string: nodeAggregateId

Resolves: #5434

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@mficzel mficzel force-pushed the feature/findByFlowQueryOperations branch 3 times, most recently from ba3793b to 7f1a11d Compare January 10, 2025 15:09
);

/** @var Node $contextNode */
foreach ($flowQuery->getContext() as $contextNode) {
Copy link
Member

Choose a reason for hiding this comment

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

maybe in this "next" generation of flowquery we want to forbid the functionality that we iterate over all context nodes and either throw if there are multiple nodes or just always pick the first one. Operating on multiple nodes might not give the expected ordering as one might think

Copy link
Member Author

Choose a reason for hiding this comment

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

The one thing that i dislike most is that context can contain anything. Would really like to limit that to nodes

@mficzel mficzel force-pushed the feature/findByFlowQueryOperations branch from 7f1a11d to 70df082 Compare January 10, 2025 15:24
`findByCriteria` allows to query the subgraph below the contextNode
arguments:
- string | null: nodeTypefilter
- string | null: propertyValueCriteria
- object{offset?:int, limit?:int} | null: pagination

`findByIdentifier` will find a node with the given aggregate id in the subgraph defined by the contextNode
arguments:
- string: nodeAggregateId

Resolves: neos#5434
@mficzel mficzel force-pushed the feature/findByFlowQueryOperations branch from 70df082 to 99a6542 Compare January 10, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FEATURE: Improved FlowQuery find operations for Neos 9
2 participants