Documentation Center

Sample query: publication filter

Use the publication filter to limit which publications are returned by an ishPublications query.

The following query limits the publications returned by the ishPublications query to only those publications whose version is 1:
{
  ishPublications(filter: {
    queryType: CUSTOM_META,
    value: "VERSION.version.value=1",
    valueType: STRING
  }) {
    edges {
      node {
        title
        publicationId
        customMetasStructure {
          data
        }
      }
    }
  }
}
The filter parameter is an IshPublicationFilter object containing the following fields:
queryType
The type of query, which can only be CUSTOM_META. That is, you can only filter publications based on a metadata key-value pair. To see which metadata keys are available, run the above query without a filter first, and check the value of the data property, which contains a full set of all metadata key-value pairs.
value
The key-value pair you want to filter on, in the format METADATAKEY=METADATAVALUE, where METADATAKEY is one of the keys found in the data property, and METADATAVALUE is one of its values.
In the sample above, we are looking for any publications whose version is 1.
valueType
The data type of the metadata key we are filtering.