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

remote execution fails when there are no hasura columns in the remote relationship #52

Open tirumaraiselvan opened 5 years ago

tirumaraiselvan commented 5 years ago

For e.g. suppose we create a relationship with only static values, then no remote query is generated. If we add a hasura column in the API (but not use it in the join), then it works.

This is because of the function peelRemoteKeys here: https://github.com/tirumaraiselvan/graphql-engine/blob/3c6ffadf23d9c8318c625426a3e92f0c329af360/server/src-lib/Hasura/GraphQL/Execute/RemoteJoins.hs#L594

neededHasuraFields is actually an empty array and this is used here for creating a Batch: https://github.com/tirumaraiselvan/graphql-engine/blob/3c6ffadf23d9c8318c625426a3e92f0c329af360/server/src-lib/Hasura/GraphQL/Execute/RemoteJoins.hs#L585