Troubleshooting

Channel SubQuery limits (errorCode: CHANNEL-PAYLOAD-LIMIT)

If you encounter this error, it means you are requesting channels along with its subqueries members and/or content and the payload size exceeded the maximum allowed for a single query. If this happens, you can reduce the number of pages requested using the first parameter or query channelMembers or channelContent via their own separate queries.

Example of a possible broken query:

Copy
query Channels {
    channels(first: 2000) {
      totalCount
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        cursor
        node {
          id
          name
          members {
            userId
            channelId
            role
            createdOn
            removedOn
          }
          content {
            id
            channelId
            index
            type
            url
          }
      }
    }
    }
  }

Try reducing the number of results:

Copy
query Channels{
    channels(first: 500) {
      totalCount
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        cursor
        node {
          id
          name
          members {
            userId
            channelId
            role
            createdOn
            removedOn
          }
          content {
            id
            channelId
            index
            type
            url
          }
      }
    }
    }
  }

Requesting separately

If your dataset doesn't allow you to query all members and content at once due to payload size limit, you can use separate queries for members and content and join your data afterwards using the channelId.

Copy
query {
  channelMembers(first:500) {
    nodes{
      channelId
      createdOn
      userId
    }
  }
}