Schema Documentation

contentType

Description

Fetch a Content Type node by unique Identifier

Response

Returns a ContentType

Arguments
NameDescription
id - ID! Unique Identifier for the Content Type node.
idType - ContentTypeIdTypeEnum Type of unique identifier to fetch a content type by. Default is Global ID

Example

Query
query contentType(
  $id: ID!,
  $idType: ContentTypeIdTypeEnum
){
  contentType(
    id: $id,
    idType: $idType
  ){
    canExportconnectedTaxonomies {
      ...ContentTypeToTaxonomyConnectionFragment
    }contentNodes {
      ...ContentTypeToContentNodeConnectionFragment
    }deleteWithUserdescriptionexcludeFromSearchgraphqlPluralNamegraphqlSingleNamehasArchivehierarchicalidisContentNodeisFrontPageisPostsPageisRestrictedisTermNodelabellabels {
      ...PostTypeLabelDetailsFragment
    }menuIconmenuPositionnamepublicpubliclyQueryablerestBaserestControllerClassshowInAdminBarshowInGraphqlshowInMenushowInNavMenusshowInRestshowUiuri
  }
}
Variables
{"id":"4","idType":"ID"}
Response
{"data":{"contentType":{"canExport":true,"connectedTaxonomies":ContentTypeToTaxonomyConnection,"contentNodes":ContentTypeToContentNodeConnection,"deleteWithUser":false,"description":"abc123","excludeFromSearch":true,"graphqlPluralName":"xyz789","graphqlSingleName":"xyz789","hasArchive":false,"hierarchical":false,"id":"4","isContentNode":false,"isFrontPage":false,"isPostsPage":true,"isRestricted":true,"isTermNode":true,"label":"xyz789","labels":PostTypeLabelDetails,"menuIcon":"abc123","menuPosition":987,"name":"abc123","public":false,"publiclyQueryable":false,"restBase":"xyz789","restControllerClass":"abc123","showInAdminBar":false,"showInGraphql":true,"showInMenu":true,"showInNavMenus":true,"showInRest":false,"showUi":true,"uri":"abc123"}}}