Contentful Graphql connects to a Nagent workspace with an API key. Once it is connected, agents can call 2 Contentful Graphql actions: "Get CMA Token" and "GraphQL Content API Persisted Query". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Contentful Graphql, with input parameters and output schema.
CONTENTFUL_GRAPHQL_GET_CMA_TOKENTool to retrieve a Contentful Management API (CMA) access token. Use when making CMA calls to ensure valid authorization.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CONTENTFUL_GRAPHQL_GRAPH_QL_CONTENT_API_PERSISTED_QUERYExecute 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
Input parameters
Full GraphQL query text. Include on first request to register the query; omit on subsequent requests to use cached version by hash only.
APQ protocol version. Must be 1.
Contentful Space ID. Example: 'cfexampleapi' for the public demo space.
Variables for parameterized GraphQL queries. Example: {"limit": 10}
SHA256 hash of the exact GraphQL query text (64 hex characters). Compute with: echo -n 'query text' \\ | sha256sum. Uppercase is auto-converted to lowercase.
Content Delivery API (CDA) access token. Overrides the token in metadata if provided.
Contentful Environment ID. Use 'master' for the default environment.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 2 Contentful Graphql actions on Nagent: "Get CMA Token" and "GraphQL Content API Persisted Query". Get CMA Token: Retrieve a Contentful Management API (CMA) access token. Each action is listed on this page with its input parameters and its output.
Contentful Graphql connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
It returns data, error and successful.