-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add manual relationship in hasura #87
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
Conversation
📝 WalkthroughWalkthroughA new relationship entry has been introduced in the configuration script for Hasura. The update adds an item to the 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)`**/*.ts`:
`scripts/**/*.ts`: Ensure scripts: - Use `process.cwd()` f...
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
using: { | ||
manual_configuration: { | ||
remote_table: { | ||
name: "projects", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got no idea about the Hasura syntax lol but is this ok? Using the same remote table name here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this is ok
Description
We need to add a manual relationship for Applications -> Projects, that emulates a many-to-many on 'projectId' (we have a Foreign key but is a One-to-Many on projectId+chainId)
This allows us to make queries like:
where we get the Canonical project/s for an Application

Summary by CodeRabbit