Replies: 1 comment 2 replies
-
Why not define a relationship between the two tables in your Hasura schema on the username and email columns and then use a nested object type query to retrieve the results. The following link shows how this works |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to check if there is a way where we can dynamically add output of one query as an input to the other query in Hasura-Graphql.
Lets say there are two unrelated tables(No PK and FK relation), the only thing common in two tables (Table1 and Table2) are that they have two columns i,e "username" and "email".
Now, lets say I have written as query for the table one as follows:
Then we have query for the second table as follows:
Now the requirement is instead of two queries we need one query as follows where the "username" and "email" are input to the second query.
Now why we need to go from table1 query is that, table1 is the connection from the previous set of tables to the next set of tables.
Same way table2 is the connection to the next set of tables, like "bookingDetails_id".
Beta Was this translation helpful? Give feedback.
All reactions