# Custom Objects

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Custom Objects in the platform.**

## Queries

### Query Custom Objects

[fetch SDL for query customObjects](#graphql-partial-sdls).

### Get Custom Object

[fetch SDL for query customObject](#graphql-partial-sdls).

## Mutations

### Create or Update Custom Object

[fetch SDL for mutation createOrUpdateCustomObject](#graphql-partial-sdls).

### Delete Custom Object

[fetch SDL for mutation deleteCustomObject](#graphql-partial-sdls).

## Output types

### CustomObject

[fetch SDL for type CustomObject](#graphql-partial-sdls).

### CustomObjectQueryResult

[fetch SDL for type CustomObjectQueryResult](#graphql-partial-sdls).

#### ReferencedResource

[fetch SDL for type ReferencedResource](#graphql-partial-sdls).

## Input types

### CustomObjectDraft

[fetch SDL for type CustomObjectDraft](#graphql-partial-sdls).

## Related pages

- [Area overview page with navigation](/api.md)
- [Previous page: REST](/api/projects/custom-objects.md)
- [Search documentation and API specs](/search.md)