Schema Documentation
mediaItemBy
Deprecated in favor of using the single entry point for this type with ID and IDType fields. For example, instead of postBy( id: "" ), use post(id: "" idType: "")
Description
A mediaItem object
Response
Returns a MediaItem
Example
Query
query mediaItemBy( $id: ID, $mediaItemId: Int,$uri: String,$slug: String){ mediaItemBy( id: $id, mediaItemId: $mediaItemId, uri: $uri, slug: $slug ){ altTextancestors { ...HierarchicalContentNodeToContentNodeAncestorsConnectionFragment }author { ...NodeWithAuthorToUserConnectionEdgeFragment }authorDatabaseIdauthorIdcaptionchildren { ...HierarchicalContentNodeToContentNodeChildrenConnectionFragment }commentCountcommentStatuscomments { ...MediaItemToCommentConnectionFragment }contentType { ...ContentNodeToContentTypeConnectionEdgeFragment }contentTypeNamedatabaseIddatedateGmtdescriptiondesiredSlugeditingLockedBy { ...ContentNodeToEditLockConnectionEdgeFragment }enclosureenqueuedScripts { ...ContentNodeToEnqueuedScriptConnectionFragment }enqueuedStylesheets { ...ContentNodeToEnqueuedStylesheetConnectionFragment }fileSizeguididisContentNodeisPreviewisRestrictedisTermNodelastEditedBy { ...ContentNodeToEditLastConnectionEdgeFragment }linkmediaDetails { ...MediaDetailsFragment }mediaItemIdmediaItemUrlmediaTypemimeTypemodifiedmodifiedGmtparent { ...HierarchicalContentNodeToParentContentNodeConnectionEdgeFragment }parentDatabaseIdparentIdpreviewRevisionDatabaseIdpreviewRevisionIdseo { ...PostTypeSEOFragment }sizesslugsourceUrlsrcSetstatustemplate { ...ContentTemplateFragment }titleuri }}
Variables
{"id":"4","mediaItemId":123,"uri":"abc123","slug":"abc123"}
Response
{"data":{"mediaItemBy":{"altText":"xyz789","ancestors":HierarchicalContentNodeToContentNodeAncestorsConnection,"author":NodeWithAuthorToUserConnectionEdge,"authorDatabaseId":123,"authorId":4,"caption":"xyz789","children":HierarchicalContentNodeToContentNodeChildrenConnection,"commentCount":123,"commentStatus":"xyz789","comments":MediaItemToCommentConnection,"contentType":ContentNodeToContentTypeConnectionEdge,"contentTypeName":"abc123","databaseId":123,"date":"abc123","dateGmt":"xyz789","description":"abc123","desiredSlug":"xyz789","editingLockedBy":ContentNodeToEditLockConnectionEdge,"enclosure":"abc123","enqueuedScripts":ContentNodeToEnqueuedScriptConnection,"enqueuedStylesheets":ContentNodeToEnqueuedStylesheetConnection,"fileSize":123,"guid":"abc123","id":"4","isContentNode":true,"isPreview":true,"isRestricted":true,"isTermNode":false,"lastEditedBy":ContentNodeToEditLastConnectionEdge,"link":"abc123","mediaDetails":MediaDetails,"mediaItemId":123,"mediaItemUrl":"abc123","mediaType":"abc123","mimeType":"xyz789","modified":"abc123","modifiedGmt":"xyz789","parent":HierarchicalContentNodeToParentContentNodeConnectionEdge,"parentDatabaseId":123,"parentId":"4","previewRevisionDatabaseId":123,"previewRevisionId":"4","seo":PostTypeSEO,"sizes":"abc123","slug":"abc123","sourceUrl":"abc123","srcSet":"abc123","status":"abc123","template":ContentTemplate,"title":"xyz789","uri":"abc123"}}}