<p>I have list of banks(institutions) that each one has branches.</p>
<blockquote>
<p>I'm using GraphQL API.</p>
</blockquote>
<p>By the bellow code I can get the branches with associated bank(institutions):</p>
<pre><code>query branches {
  entries(limit: 50, section: &quot;branches&quot;, orderBy: &quot;dateUpdated&quot;) {
    id
    branchTitle: title
    ... on branches_standard_Entry {
      branchAddress: map
      bank: institution {
        ... on institutions_standard_Entry {
          bankName: title
          bankLogo: logo {
            url
          }
        }
      }
    }
  }
}
</code></pre>
<p>But when I want to access data in reverse, getting banks(institutions) and its related branches. There is no possibility or I can't find it.</p>
<p>So how I can get the banks(institutions) with related branches?
I reach to this query:</p>
<pre><code>query banks_with_branches {
  entries(section: &quot;institutions&quot;, limit: 50) {
    ... on institutions_standard_Entry {
      bankTitle: title
      hqState
    }
  }
}
</code></pre>
<p><a href="https://i.sstatic.net/bdoxX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bdoxX.png" alt="This is the second query explore window that doesn't have the branches to access" /></a>
<a href="https://i.sstatic.net/fyyyv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fyyyv.png" alt="This is the first query that I can access the institutions " /></a></p>

CC BY-SA 4.0
2022-06-13T08:30:34.667Z
Bump. We've faced similar issue.
Mark H.
CC BY-SA 4.0
2022-06-13T08:33:23.910Z
let me know if you've found any solutions for this
I'm also looking for the answer
Parth Gondaliya
<entries><relations><entry><query>
how to retrieve any/all related entries?
# how to retrieve any/all related entries?

(Asked by: username_0 on 2021-08-14)

I have list of banks(institutions) that each one has branches.

I'm using GraphQL API.

By the bellow code I can get the branches with associated bank(institutions):
query branches {
  entries(limit: 50, section: "branches", orderBy: "dateUpdated") {
    id
    branchTitle: title
    ... on branches_standard_Entry {
      branchAddress: map
      bank: institution {
        ... on institutions_standard_Entry {
          bankName: title
          bankLogo: logo {
            url
          }
        }
      }
    }
  }
}

But when I want to access data in reverse, getting banks(institutions) and its related branches. There is no possibility or I can't find it.
So how I can get the banks(institutions) with related branches?
I reach to this query:
query banks_with_branches {
  entries(section: "institutions", limit: 50) {
    ... on institutions_standard_Entry {
      bankTitle: title
      hqState
    }
  }
}

**Tags:** entries, relations, entry, query
> **Comments:**
> **username_1**: Bump. We've faced similar issue.  
> **username_2**: let me know if you've found any solutions for this I'm also looking for the answer  

---

## 0 answers

