# Contentful Graphql

The Contentful GraphQL Content API allows developers to query and deliver content using GraphQL, providing a flexible and efficient way to access content stored in Contentful.

- **Category:** developer tools
- **Auth:** API_KEY
- **Tools:** 3
- **Triggers:** 0
- **Slug:** `CONTENTFUL_GRAPHQL`
- **Version:** 20260211_00

## Tools

### Get CMA Token

**Slug:** `CONTENTFUL_GRAPHQL_GET_CMA_TOKEN`

Tool to retrieve a Contentful Management API (CMA) access token. Use when making CMA calls to ensure valid authorization.

### GraphQL Content API Persisted Query

**Slug:** `CONTENTFUL_GRAPHQL_GRAPH_QL_CONTENT_API_PERSISTED_QUERY`

Execute a GraphQL query using Automatic Persisted Queries (APQ). APQ reduces bandwidth by sending only a SHA256 hash instead of the full query text after initial registration. Workflow: 1. First request: Include both sha256_hash and query text to register the query 2. Subsequent requests: Send only sha256_hash and variables - the server uses the cached query Common errors: - PersistedQueryNotFound: Query not cached; include the full query text - PersistedQueryMismatch: Hash doesn't match query text; recompute the hash - UNKNOWN_SPACE: Invalid space_id or access_token for the space

### GraphQL Content API Query

**Slug:** `CONTENTFUL_GRAPHQL_GRAPH_QL_CONTENT_API_QUERY`

Execute a GraphQL query against the Contentful Content Delivery API (CDA). Use this tool to fetch published content from a Contentful space using GraphQL. Supports schema introspection, collection queries with filters/pagination, and parameterized queries with variables. Endpoint: POST https://graphql.contentful.com/content/v1/spaces/{space_id}/environments/{environment_id} Common use cases: - Fetch entries: { entryCollection(limit: 10) { items { sys { id } } } } - Fetch assets: { assetCollection { items { title url } } } - Introspect schema: { __schema { types { name } } }
