---
category: [Administration & Integrations, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions, Platform and Product Extensions/Workday Extend, Platform and Product Extensions/Integration]
keyword: [Extend, Workday Graph API, Graph API, GraphQL]
nav: wcp_docs
parent_url: /wcp_docs/
title: Model Components in the Graph API Schema
layout: subsection
---

You can access these model components in the Workday Graph API schema:

-   Business objects.
-   Attachment objects.
-   Event business objects.


## <a id="section_dsq_ckl_bwb"></a>Model Component Queries

You can use the Workday Graph API to query Extend business objects, attachments, and event business objects. When you deploy an app with model components to the tenant:

-   The Graph API schema adds or updates corresponding query and mutation operations for the model components.
-   You must refresh your browser to see the updated Graph API schema.


The Graph API schema uses these naming convention for the query operations:

-   `<app reference id>_<BusinessObject name>`
-   `<app reference id>_<Attachment name>`
-   `<app reference id>_<EventBusinessObject name>`


We include the reference ID of the Extend app to ensure that the name of the query or mutation operation is unique in the Graph API schema. If you import an app from one account to another, you must update the names of the query operations in that app to use the reference ID of the target account.

<b>Note:</b> If the:

-   Reference ID of your app.
-   Name of any field in your app.


begins with a number, the Graph API schema inserts the `App_` prefix before the reference ID of your app or the name of any affected field in your app.

In general, you must begin the reference ID of your app and the name of any field in your app with a letter.

You must pass in the data source to query the data from. You can also pass in a filter parameter if you want to filter the instances returned from the data source. If your query doesn't use a filter, specify an empty `dataSource`. Example: `dataSource: {charitableDonations_ycjtxv_charities: {}}`.

<b>Business Objects</b>

Business Object Example:

```
query {
charitableDonations_ycjtxv_Charity(
  dataSource: {charitableDonations_ycjtxv_charities: {}}) {
  data {
    total
    name
    matchDonations
  }
}
}
```

<b>Attachments</b>

You can retrieve only the download ID and fields on attachments, but not the file attachments themselves.

Example: This sample query retrieves the Charity Donations Logo attachment data, including the `downloadID`.

```
query {
charitableDonationscw_ycjtxv_CharityLogo(
  dataSource: {charitableDonationscw_ycjtxv_charityLogos: {}}
) {
  data {
    downloadID
    descriptor
    contentType
    uploadedBy {
      workdayID {
        id
      }
    }
    uploadedDate
  }
}
}
```

To download a file attachment, call the Attachments REST API with the `downloadID` as the path parameter. Example:

```
https://api.workday.com/attachments/v1/graphql/{ID}
```

where `{ID}` is the `downloadID` value.

For more details, see [Graph API Attachments](/wcp_docs/GUID-f55baa31-61f8-441e-bd0a-2482ad551254-enHYPHENus.html) and [Download Files with Graph API](/wcp_docs/GUID-9a01f53a-2ca2-447a-a215-4c6dee713e7c-enHYPHENus.html).

## <a id="section_mhl_fbc_ptb"></a>Model Component Mutations

Extend business objects support the `create`, `update`, and `delete` Graph API mutations. Mutation operations use this naming pattern:

-   `<app reference id>_create<BusinessObject name>`
-   `<app reference id>_update<BusinessObject name>`
-   `<app reference id>_delete<BusinessObject name>`


We include the reference ID of the Extend app to ensure that the name of the query or mutation operation is unique in the Graph API schema. If you import an app from one account to another, you must update the names of the mutation operations in that app to use the reference ID of the target account.

<b>Note:</b> If the reference ID of your app begins with a number, the Graph API schema inserts the `App_` prefix to the reference ID of your app. In general, you must begin the reference ID of your app with a letter.

<b>Business Objects</b>

This sample mutation uses a `create` operation to write data to the Charity business object.

Business Object Examples:

```
mutation createCharity(
$input: charitableDonations_ycjtxv_CharitiesSummaryInput!) {
charitableDonations_ycjtxv_createCharity(input: $input) {
  name
  matchDonations
  id {
    id
  }
}
}
```

You must pass in the `input` field as a variable:

```
{
      "input": {
          "name":"My Test Charity",
          "matchDonations": true
      }
}
```

This sample mutation uses an `update` operation to write data to the Charity business object:

```
mutation updateCharity(
$input: charitableDonations_ycjtxv_CharitiesSummaryInput!,
$id: IdentifierInput!
) {
charitableDonations_ycjtxv_updateCharity(input: $input, charitiesId: $id) {
  name
  descriptor
}
}
```

You must pass in the `input` and `id` fields as variables:

```
{
    "input": {
        "name": "test"
      },
      "id": {
         "type": "WID",
         "id": "4827ae9d059390001b5b81ce20970000"
      }
}
```

<b>Attachments</b>

Extend automatically generates these attachment mutations that enable you to create, update, and delete file attachments:

-   `<app reference id>_create<Attachment name>`
-   `<app reference id>_create<AttachmentsCollection name>`
-   `<app reference id>_update<Attachment name>`
-   `<app reference id>_delete<Attachment name>`


Submit the create and update attachment mutations with the Graph API as a multipart/form-data request. The mutation input argument includes the `attachmentContent` field, which is of the File type. The `attachmentContent` field specifies the part name of the corresponding file part name in the Graph API multipart request.

Example: This sample mutation submits a Charitable Donations Logo attachment.

```
mutation charitableDonationscw_createCharityLogosCollection($charitableDonationscw_createCharityLogosCollection_input: CharitableDonationscw_CharityLogosCollection_CreateInput!) {
charitableDonationscw_createCharityLogosCollection(
  input: $charitableDonationscw_createCharityLogosCollection_input
) {
  charityLogos {
    workdayID {
      id
    }
  }
}
}
```

The sample input variable contains the `attachmentContent` field, which specifies the <i>file0</i> part name:

```
{
"charitableDonationscw_createCharityLogosCollection_input": {
  "charityLogos": [
    {
      "attachmentContent": "file0",
      "uploadedBy": {
        "id": {
          "id": "3aa5550b7fe348b98d7b5741afc65534",
          "type": "WID"
        }
      },
      "uploadedDate": "2024-11-06"
    }
  ]
}
}
```

For more details, see [Graph API Attachments](/wcp_docs/GUID-f55baa31-61f8-441e-bd0a-2482ad551254-enHYPHENus.html) and [Upload Files with Graph API](/wcp_docs/GUID-82f497c2-062b-4768-b56f-6d27c43b9ff9-enHYPHENus.html).

<b>Event Business Objects</b>

Extend automatically generates event business objects for each Extend business process you create. Event business objects support the `create` Graph API mutation. Mutation operations use this naming pattern:

```
<app reference id>_create<event business object name>
```

This sample mutation uses a `create` operation to write data to the Create Charity Event event business object.

Event Business Object Example:

```
mutation createCharityEvent(
$input: charitableDonations_ycjtxv_CreateCharityEventsSummaryInput!) {
charitableDonations_ycjtxv_createCreateCharityEvent(input: $input) {
  id {
    id
  }
  descriptor
  businessProcessTarget {
    descriptor
    id {
      id
    }
  }
  warningValidations
  criticalValidations
}
}
```

You must pass in the `input` field as a variable:

```
{
"input": {
  "businessProcessTarget": {
    "id": {
      "id": "5ce248fe116e900008dd1e9027a70000",
      "type": "WID"
    }
  }
}
}
```

## <a id="section_m3f_2pc_3xb"></a>Sample App

The [Vehicle Registration](https://developer.workday.com/app-catalog/vehicleRegistration) app in the App Catalog uses model business objects and Graph API in a Vehicle Registration hub.

### Related Information

[Generate Queries on Graph API Explorer](/wcp_docs/uip1679531855079.html)

