Archive API docs
    Jump to

    Narrow by kind with a prefix — q: queries, m: mutations, t: types, g: guides, f: fields and arguments.

    Jump to examples ↓
    Query

    competitorBrandItems

    Paginate Competitor Insights posts for a brand within a required filter.takenAt window. Posts for a given month become queryable on day 9 of the following month.

    Arguments

    Object, input and enum types open in place — use + to reveal their fields. A type that is already open above the row stops at a ↻ circular marker, and anything nested past the depth limit links out to its own page instead.

    after String default null
    Opaque cursor for fetching the next page of results. Cursors are positional: reuse one only with identical brandId, filter and sorting arguments. A malformed cursor, including one minted by an earlier release, is rejected with an Invalid cursor error. Pagination depth is capped at 10,000 posts per query; narrow the takenAt window to page beyond that.
    brandId ID! required
    Competitor Insights brand UUID. If the brand is not tracked by the current workspace, the query returns an empty connection.
    filter CompetitorBrandItemFilterInput! required
    Filter criteria. A takenAt time window is required; unbounded queries are not supported.
    first Int default 20
    Number of posts to return (page size).
    sorting [CompetitorBrandItemSortingInput!] default [{sortKey: TAKEN_AT, sortOrder: DESC}]
    Sort configuration. Currently accepts a list of at most one entry; multiple entries are rejected. The list shape exists for forward compatibility: a future release may honor compound sort additively without a breaking schema change. Defaults to [{ sortKey: TAKEN_AT, sortOrder: DESC }] when omitted. EARNED_MEDIA_VALUE ranks posts as a single ordering across the entire requested takenAt window. Ties are broken by the post identifier, ascending.

    Returns

    A paginated connection of CompetitorBrandItem nodes. See Pagination for the connection shape.

    edges [CompetitorBrandItemEdge!]!
    List of edges with cursors.
    nodes [CompetitorBrandItem!]!
    List of competitor brand items.
    pageInfo PageInfo!
    Pagination information.
    totalCount Int
    Total number of items available.