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

test: add relationship traversal tests for MemoryDatabase #1097

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mshakeg
Copy link
Contributor

@mshakeg mshakeg commented Jan 3, 2025

Description

This PR adds comprehensive test cases for entity relationship handling in the MemoryDatabase class. All test cases currently fail, highlighting that the current implementation does not properly support relationship traversal as defined in the GraphQL schema.

The test cases cover:

  • One-to-Many relationships (Transaction -> TransactionReceipt[])
  • Many-to-One relationships (TransactionReceipt -> Transaction)
  • Interface Implementation (Transaction.sender as Owner)
  • Derived Relationships (User.organizations via @derivedFrom)
  • Deep Relationship Traversal (Transaction -> Receipt -> Transaction -> Receipt)

Intent

These test cases are submitted as a first step in a test-driven development approach. While I don't have the capacity to investigate and implement the fixes at the moment, I hope these tests provide clear expectations of how entity relationships should work in the MemoryDatabase.

I invite the Sentio maintainers to take over from here:

  1. Investigate why these relationship traversals are failing
  2. Implement the necessary changes to make these tests pass
  3. Add any additional test cases they deem necessary

Related issue: #1096

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.

1 participant