Link Filtering

You can filter on Links within Entries. The same logic applies as for nested filtering: your Content Model must include validations specifying the Content Type (or types) for the Link. For example, the following schema can be generated for a content model that contains a Blog Post content type, with the Title and Content fields as strings and a Link to an entry with a validation specifying an Author:

1type BlogPost {
2 sys: Sys
3 title: String
4 content: String
5 author: Author
6}
7
8type Author {
9 sys: Sys
10 name: String
11}

You can filter on any fields of the author type. For example:

1query {
2 blogPostCollection {
3 items {
4 title
5 content
6 author(where: {name: "Blog Post Author"}) {
7 name
8 }
9 }
10 }
11}

If there is a match, the author will be returned. Otherwise, you will receive a null value. All of the same filters that are available on collections are available on this single link level.