# nodeFile

Audience: Programmer

Fetches an object given its ID.

Fetches an object given its ID.

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

## Arguments

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | ID! |  | ID of the object. |

## Returns

[NodeFile](https://docs.pyck.cloud/latest/api/interfaces/nodefile.md)

## Example

Fetches one file by its global ID. The inline fragment selects the File fields; the lookup returns null when no object has that ID.

```graphql
query GetNodeFile($id: ID!) {
  nodeFile(id: $id) {
    id
    ... on File {
      tenantID
      name
      contentType
      refid
      createdAt
    }
  }
}
```

**Variables**

```json
{
  "id": "<file ID>"
}
```
