files
QueryReturns a searchable, paged list of files.
Arguments
- String
after Returns the elements in the list that come after the specified cursor.
- String
before Returns the elements in the list that come before the specified cursor.
- Int
first Returns the first n elements from the list.
- Int
last Returns the last n elements from the list.
- String
query - A filter expression made up of terms, boolean operators, modifiers, and comparators. Combine one or more filters in a single query.
Available filters7
defaultstringSearches indexed file names, extensions, media types, and content hashes. Every term must match.
Examplesproduct photoimage/jpegidIDMatches a file by its unique identifier.
Exampleid:media_...file_namestringMatches the file name. Phrases and prefix wildcards are supported.
Examplesfile_name:"product photo.jpg"file_name:product*file_extensionstringMatches the file extension without a leading dot.
Examplefile_extension:jpgcontent_typestringMatches the file's media type.
Examplecontent_type:image/jpeghashstringMatches the stored content hash.
Examplehash:abc123...created_atdateCompares the file creation date using an ISO 8601 date or timestamp.
Examplecreated_at:>="2026-01-01"
- SortDirection
sortDirection Sort direction (ascending or descending).
Possible enum valuesASCOrders values from lowest to highest or alphabetically from A to Z.
DESCOrders values from highest to lowest or alphabetically from Z to A.
- MediaSortKeys
sortKey Field key to sort by.
Possible enum valuesCREATED_ATSorts by the date and time the media was created.
FILE_NAMESorts by the original file name.
FILE_SIZESorts by the file size in bytes.
Payload
- [MediaEdge!]
edges A list of edges.
- [Media!]
nodes A flattened list of the nodes
- PageInfo!
pageInfo Information to aid in pagination.
- Int!
totalCount Identifies the total count of items in the connection.