Skip to content

Commit

Permalink
server: document the remote joins architecture
Browse files Browse the repository at this point in the history
GitOrigin-RevId: f142908
  • Loading branch information
codingkarthik authored and hasura-bot committed Mar 3, 2021
1 parent 42f5d66 commit 15ed0cf
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions server/src-lib/Hasura/GraphQL/Execute/RemoteJoin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ import Hasura.RQL.IR.Returning
import Hasura.RQL.IR.Select
import Hasura.RQL.Types

{- Note: [Remote Joins Architecture]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unparsed Incoming GraphQL +------------------------------+
--------------------------> | Parsing of the GraphQL query |-----+
+------------------------------+ |
| DB Query and remote joins (if any)
|
V
+----------------------------------+ SQL query response +----------------------------+
| Traverse the DB response to | <------------------- | Execution of the DB query |
| get the values of the arguments | +----------------------------+
| of the remote field |
+----------------------------------+
|
| Remote field arguments
V
+--------------------------+ Remote schema response +----------------------------------------+
| Query the remote schema | ------------------------> | Replace the remote join fields in |
| with the remote field | | the SQL query response (JSON) with |
| arguments to the remote | | the response obtained from the remote |
| field configured in the | | schema at appropriate places. |
| remote join. | +----------------------------------------+
+--------------------------+
-}



-- remote joins info

Expand Down

0 comments on commit 15ed0cf

Please sign in to comment.