Filter By Content Type
Filter all content by type in your Graphlit project.
By specifying the types
field in the GraphQL filter object, you can filter your content by one or more content types.
For example, here we are filtering just on page
types.
"types": [ "PAGE" ]
If you want to find content which are file
, page
or post
types, you could use:
"types": [ "FILE", "PAGE", "POST" ]
Query:
query QueryContents($filter: ContentFilter!) {
contents(filter: $filter) {
results {
id
name
creationDate
state
owner {
id
}
originalDate
finishedDate
workflowDuration
uri
text
type
fileType
mimeType
fileName
fileSize
masterUri
mezzanineUri
transcriptUri
feed {
id
name
}
collections {
id
name
}
}
}
}
Variables:
{
"filter": {
"types": [
"PAGE"
],
"offset": 0,
"limit": 100
}
}
Response:
{
"results": [
{
"type": "PAGE",
"mimeType": "text/html",
"fileType": "DOCUMENT",
"fileName": "gpt-4.htm",
"fileSize": 194133,
"masterUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/2fd457d0-5254-444d-b33e-f950f90f12bf/gpt-4.htm",
"mezzanineUri": "https://graphlit20230701d31d9453.blob.core.windows.net/files/2fd457d0-5254-444d-b33e-f950f90f12bf/Mezzanine/gpt-4.json",
"collections": [],
"uri": "https://openai.com/research/gpt-4",
"id": "2fd457d0-5254-444d-b33e-f950f90f12bf",
"name": "GPT-4",
"state": "FINISHED",
"creationDate": "2023-07-03T22:38:00Z",
"finishedDate": "2023-07-03T22:39:06Z",
"workflowDuration": "PT1M6.0812698S",
"owner": {
"id": "9422b73d-f8d6-4faf-b7a9-152250c862a4"
}
}
]
}
Last updated
Was this helpful?