o365TeamChannels
GetTeamChannelsV2 returns a paginated, GraphQL-shaped list of channels for a Teams workload. Encapsulates the response shaping (TeamChannelInfo -> O365TeamsChannelObject, including the membership-type enum parse) that previously lived in the GraphQL resolver o365TeamChannels.
Arguments
| Argument | Type | Description |
|---|---|---|
| first | Int | Returns the first n elements from the list. |
| after | String | An opaque cursor returned from a previous query's endCursor field. Pass this value verbatim to retrieve the next page of results. |
| last | Int | Returns the last n elements from the list. |
| before | String | An opaque cursor returned from a previous query's startCursor field. Pass this value verbatim to retrieve the previous page of results. |
| snappableFid (required) | UUID! | The FID for the Teams workload. |
| excludeArchived (required) | Boolean! | Whether archived channels are omitted. |
| channelMembershipTypeFilter (required) | ChannelMembershipType! | Filter on channel membership type. |
| nameFilter | String | Optional display-name substring filter. |
Returns
Sample
query O365TeamChannels($snappableFid: UUID!, $excludeArchived: Boolean!, $channelMembershipTypeFilter: ChannelMembershipType!) {
o365TeamChannels(
snappableFid: $snappableFid
excludeArchived: $excludeArchived
channelMembershipTypeFilter: $channelMembershipTypeFilter
first: 10
) {
nodes {
folderId
folderName
id
isArchived
membershipType
name
naturalId
}
pageInfo {
hasNextPage
endCursor
}
}
}
{
"data": {
"o365TeamChannels": {
"nodes": [
[
{
"folderId": "example-string",
"folderName": "example-string",
"id": "example-string",
"isArchived": true,
"membershipType": "ALL",
"name": "example-string"
}
]
],
"pageInfo": {
"endCursor": "example-string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "example-string"
}
}
}
}