question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data UI JS error on relation with a view without FK

See original GitHub issue

Follow up from here: https://github.com/hasura/graphql-engine/issues/1167

Hi 👋

I have an issue, after creating my new relationship the UI for data schema crash (JS error) with the message “Something went wrong”

If I remove the relationship directly in the database it works again. I’ve traced the JS error to this line: https://github.com/hasura/graphql-engine/blob/c3f4c35141f1187fc2f0f107158c1dff26f34568/console/src/components/Services/Data/TableRelationships/autoRelations.js#L110

Here is my faulty hdb_relationship row:

table_schema table_name rel_name rel_type rel_def comment is_system_defined
public orders states array {"manual_configuration": {"remote_table": "orders_states", "column_mapping": {"id": "resource_id"}}} NULL f

Did I missed something or this is a bug? Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
iam4xcommented, Jan 4, 2019

Huh, with this simple example I submitted, I cannot reproduce the bug.

My database is pretty complex, I’m going to investigate more and find out what is causing the bug 👍

0reactions
dsandipcommented, Jan 11, 2019

@karthikvt26 @arvi3411301 Can this issue be closed? The associated PR has been marked as closed as Arvi’s already taken care of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create foreign key relationships in the Table Editor
Now how to set a foreign key without causing the error: ... Within the Database -> Tables view we are provided with the...
Read more >
Entity Framework foreign key relationship returns no data
The cause of your problem is that you forgot to define a property for your foreign key. Because of the foreign key attribute, ......
Read more >
3 common foreign key mistakes (and how to avoid them)
Foreign key constraints are important to any SQL database, but they can also cause problems if they're not implemented correctly.
Read more >
Add a foreign key constraint to an existing column - GitLab Docs
If we can find “invalid” records by doing a database query and the record count is not high, then the data migration can...
Read more >
Violation of constraints in relational database - GeeksforGeeks
Referential integrity : On inserting a value in the foreign key of relation 1, for which there is no corresponding value in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found