Open John0x opened 4 years ago
This might cause a circular reference. It's explained here https://github.com/hasura/graphql-engine/issues/2494#issuecomment-675498002
This is remote schema to db join which is part of the roadmap and will be possible soon (Action relationships are kind of similar btw).
Great, thank you :) Is there a rough a ETA on when that feature will arrive?
Just want to clarify that this is a sort of 'right join' where a remote schema can return a key then hasura will look up that key and return the data? The opposite of current remote join where hasura sends key and remote schema resolves, this would allow remote schema to pass key back to hasura and hasura would resolve? Beacuse that would be amazing
Looking forward to this feature
I was trying to do exactly that but found out it's not supported yet. This is an important feature for anyone using remote schemas, especially so if using apollo client in the frontend.
Use case:
UpdateUser
mutation that returns the updated_user_id: String
field.updatedUser: User
, which joins UpdateUser.updated_user_id
to the user.id
record. Just like it's possible with Actions.Is there any update related to when this feature is going to become available? Or if it's planned at all. Anything the community can do to help with the development of this?
Is there any update related to when this feature is going to become available? Or if it's planned at all.
This is definitely planned and high up in our priority.
@tirumaraiselvan are there any updates related to this? Any chances for this to be included with v2?
@JCMais According to @coco98 it should be released by end of May. 🎊
Any status on this @0x777?
It's me again, I'm back from the future.
Apparently it's the last remaining feature of the quarter and it should be ready for the end of September (@coco98 gave me the ETA earlier this week). 🤞
Hopefully I won't be wrong this time, it's my most needed feature. 😅
I was trying to do exactly that but found out it's not supported yet. This is an important feature for anyone using remote schemas, especially so if using apollo client in the frontend.
Use case:
- Remote schema has an
UpdateUser
mutation that returns theupdated_user_id: String
field.- In Hasura, add a remote join extending this mutation with a new field,
updatedUser: User
, which joinsUpdateUser.updated_user_id
to theuser.id
record. Just like it's possible with Actions.- This would allow GraphQL clients, like the Apollo Client, to automatically update the record locally, without having to refetch the data.
Is there any update related to when this feature is going to become available? Or if it's planned at all. Anything the community can do to help with the development of this?
This is the exact use case that I've run into when using remote schemas and as its supported through Hasura Actions I really hope that it drops soon! This is basically the last missing piece for incredibly deep integration with Remote Schemas that could make things ready for primetime
Hi folks, we have a PR to start trying this feature out! Currently via metadata only, and we'll be merging in other finishing touches and the console soon.
https://github.com/hasura/graphql-engine/pull/7647
Would love your feedback and any comments you have.
Will we likely see this merged soon?
This is finally implemented in Hasura v.2.5.0 🎉🎉🎉 Thanks to all those who were involved in getting this out, it works great!
Sadly you cannot manage relationship via the console yet, but you can see some notes on how to make remote schema relationships via the API in the v2.5.0 release changelog here.
For anyone else that likes to manage metadata via yaml files and use the Hasura CLI, here is what i did to get remote schema to database relationships working.
In your remote_schemas.yaml
- name: my_remote_schema
definition:
url_from_env: MY_REMOTE_SCHEMA_URL
forward_client_headers: true
timeout_seconds: 60
remote_relationships:
- type_name: MyType
relationships:
- name: my_remote_relationship
definition:
to_source:
relationship_type: object
source: my_database
table:
schema: public
name: my_table
field_mapping:
my_remote_field: my_table_column
Hey, I expected the remote joins to support responses as well and not just arguments of an query. Will this be supported in the future?
One of my remote schemas responses contains the userId, which I would like to join with the "user" table, so that on the response someone could also query the user object.