query Search(
  $after: String
  $first: Int
  $query: String
  $format: String
  $includeContent: Boolean
) {
  search(
    after: $after
    first: $first
    query: $query
    format: $format
    includeContent: $includeContent
  ) {
    ... on SearchSuccess {
      edges {
        cursor
        node {
          id
          title
          slug
          url
          pageType
          contentReader
          createdAt
          isArchived
          readingProgressPercent
          readingProgressTopPercent
          readingProgressAnchorIndex
          author
          image
          description
          publishedAt
          ownedByViewer
          originalArticleUrl
          uploadFileId
          labels {
            id
            name
            color
          }
          pageId
          shortId
          quote
          annotation
          state
          siteName
          subscription
          readAt
          savedAt
          wordsCount
          recommendations {
            id
            name
            note
            user {
              userId
              name
              username
              profileImageURL
            }
            recommendedAt
          }
          highlights {
            ...HighlightFields
          }
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
        totalCount
      }
    }
    ... on SearchError {
      errorCodes
    }
  }
}

fragment HighlightFields on Highlight {
  id
  type
  shortId
  quote
  prefix
  suffix
  patch
  annotation
  createdByMe
  createdAt
  updatedAt
  sharedAt
  highlightPositionPercent
  highlightPositionAnchorIndex
  labels {
    id
    name
    color
    createdAt
  }
}
