# Approval Flows

## 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.

**Mutations and types for managing Approval Flows in the platform.**

## Mutations

### Update Approval Flow

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

## Output types

### ApprovalFlow

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

### ApprovalFlowQueryResult

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

## Input types

### ApprovalFlowUpdateAction

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

### Update actions

#### Decisions

##### Approve

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

##### Reject

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

#### Custom Fields

##### Set Custom Type

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

##### Set Custom Field

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

## Related pages

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