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

In remote relationship with nested fields, the parent fields should not be of type list #56

Open nizar-m opened 5 years ago

tirumaraiselvan commented 5 years ago

@nizar-m Can you also describe the remote schema and the remote relationship to see this?

nizar-m commented 5 years ago

Let us say we have author ---remote arr_rel--> remote_articles ---obj_rel--> publisher. This should throw an error

type: create_remote_relationship
args:
  name: nestedPublisher
  table: author
  hasura_fields:
   - id
   - publisher_ids 
  remote_schema: remote_articles
  remote_field:
     articles:
        arguments:
          author_id : $id
        field:
          publisher:
            arguments:
              where:
                publisher_id:
                  _in: $publisher_ids

So should be this local ---remote obj_rel--> remote_field ---arr_rel--> remote_sub_field ---obj_rel--> remote_leaf

The last relationship can be an object or array relationship. But all the in between ones should be object relationships.