# files

Audience: Developer

**Served by:** [file](https://docs.pyck.cloud/api/services/file.md)

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `after` | [Cursor](https://docs.pyck.cloud/api/scalars/cursor.md) | Returns the elements in the list that come after the specified cursor. |
| `first` | Int | Returns the first _n_ elements from the list. |
| `before` | [Cursor](https://docs.pyck.cloud/api/scalars/cursor.md) | Returns the elements in the list that come before the specified cursor. |
| `last` | Int | Returns the last _n_ elements from the list. |
| `orderBy` | [FileOrder](https://docs.pyck.cloud/api/inputs/fileorder.md) | Ordering options for Files returned from the connection. |
| `where` | [FileWhereInput](https://docs.pyck.cloud/api/inputs/filewhereinput.md) | Filtering options for Files returned from the connection. |

## Returns

[FileConnection](https://docs.pyck.cloud/api/types/fileconnection.md)!

## Example

Retrieves a paginated list of files. Results can be filtered by any FileWhereInput field and ordered by available FileOrder fields.

```graphql
query GetFiles($after: Cursor, $first: Int, $before: Cursor, $last: Int, $orderBy: FileOrder, $where: FileWhereInput) {
  files(after: $after, first: $first, before: $before, last: $last, orderBy: $orderBy, where: $where) {
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges {
      cursor
      node {
        contentType
        createdAt
        createdBy
        data
        dataTypeID
        dataTypeSlug
        deletedAt
        deletedBy
        description
        id
        name
        publicAlias
        publicURL
        refid
        reftype
        size
        tenantID
        updatedAt
        updatedBy
        url
      }
    }
  }
}
```

**Variables**

```json
{
  "where": {
    "reftype": "supplier"
  }
}
```
