tirumaraiselvan / graphql-engine

Blazing fast, instant realtime GraphQL APIs on Postgres with fine grained access control
https://hasura.io
Apache License 2.0
2 stars 0 forks source link

fix/ remote relationships not loading #4485 #91

Closed soorajshankar closed 4 years ago

soorajshankar commented 4 years ago

Description

Changelog

Affected components

Related Issues

4485

Solution and Design

Found remote_relationships is not having data with configuration instead it has the required values with the key definition. Observed that this data is coming from the server in this shape, hence not so sure if this will be a permanent refactoring or a conditional one. In this situation made a handler that handles both the scenarios and makes sure that the UI renders error-free.

Steps to test and verify

  1. Go to Console, open Remote schema.
  2. Create a valid remote schema ( I used onegraph referring this)
  3. Go to Hasura console
  4. click on Data tab
  5. Create a new data table.
  6. click on Relationships tab.
  7. Under Remote Relationships click on Add a new remote relationship button.
  8. Choose the remote schema and create the remote schema relationship.
  9. Click on the Save Button.

Current Behaviour

Remote schema relationship does not get created, it throws an error. as mentioned here #4485

Expected Behaviour

Remote schema relationship has to save successfully and it should be listed as shown below. image

Limitations, known bugs & workarounds

If the key is permanently changed to definition then this extra check may not be required, also code pollution.

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

Metadata

Does this PR add a new Metadata feature?

GraphQL

Breaking changes

soorajshankar commented 4 years ago

@wawhal Please give your thoughts.

soorajshankar commented 4 years ago

I also put an error message as follows image

Please let me know if this is not relevant. @wawhal