-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[v1.3.0-beta.2] Error remote relationship: cannot validate remote relationship because expected type \"Int\" but got \"Int\" #5133
Comments
Per guidance in Discord preview channel, I'm adding another error example I encountered trying to create a remote relationship with a sanity.io schema. The goal is to store the "likes" by a user on a sanity object in postgres and be able to get back the user's likes and data about the object with a single query. Steps to reproduce:
Error
I also tried with a |
I ran into the same problem. |
Also got the same problem with sanity.io using v1.3.0-beta.4 |
Problem can still be reproduced on v1.3.0 release. |
The issue here is that the graphql types must be exactly the same for the remote relationship to be valid. You cannot join I also agree that As for the OP's issue: @kuzmi4 Can you give the table definition and a sample remote schema definition which is causing this failure? I am not able to reproduce this. |
I made demo scene with same problem Hasura: https://issues-5133.herokuapp.com/console Just try add remote relationship |
Interestingly i am not able to map string to string field also
|
@kuzmi4 Thank you for the repro and sorry for the delay. We will fix it ASAP. @tanmaypatil The error message seems to not talk about the type of |
@tirumaraiselvan Response is `{"code":"data_api_error","message":"{"internal":[{"definition":{"remote_field":{"account":{"arguments":{"id":"$account_number"}}},"name":"map_phy_acct","hasura_fields":["account_number"],"remote_schema":"phy_acct","table":{"schema":"vam","name":"physical_account"}},"reason":"in table \"vam.physical_account\": in remote relationship\"map_phy_acct\": cannot validate remote relationship because type \"Account\"only objects or scalar types expected","type":"remote_relationship"}],"path":"$.args[0].args","error":"in table \"vam.physical_account\": in remote relationship\"map_phy_acct\": cannot validate remote relationship because type \"Account\"only objects or scalar types expected","code":"constraint-violation"}"} |
@kuzmi4 From the error message it seems that you were trying to create a remote relationship between |
@codingkarthik good news. Thanks. |
Hi
Steps to reproduce:
The text was updated successfully, but these errors were encountered: