Skip to content

Conversation

Ishank307
Copy link
Contributor

Description

Adds validation to detect circular dependencies in custom types and shows proper error messages in the issues panel.

Problem

When users create custom types that reference each other (e.g., type_1 has a field of type_2, and type_2 has a field of type_1), no error was shown. This could lead to invalid type structures.

Solution

  • Added checkCircularTypes function to detect type reference loops
  • Added proper translation keys for the error message
  • Shows clear error: "Circular type dependency involving type 'X'"

How to Test

  1. Go to Types tab in sidebar
  2. Create type_1 with a field of type type_2
  3. Create type_2 with a field of type type_1
  4. Check Issues panel - should show circular dependency error

Type of Change

  • Bug fix (adds missing validation)
  • Enhancement (improves user experience)

Fixes missing validation for circular type references.

FIxes Show error for circular type references #615

When creating custom types that reference each other (like type_1 has a field
of type_2, and type_2 has a field of type_1), the app should show an error
in the issues panel.

This was missing before - only table relationships were checked for circular
dependencies, not custom type field references.

Changes:
- Added checkCircularTypes function to detect type reference loops
- Added 'circular_type_dependency' translation key in English and Spanish
- Now shows proper error: 'Circular type dependency involving type X'

Fixes the issue where users could create invalid type structures without
any warning.
Copy link

vercel bot commented Oct 5, 2025

@Ishank307 is attempting to deploy a commit to the dottle's projects Team on Vercel.

A member of the Team first needs to authorize it.

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