Optimizely · Capability

Optimizely Graph API — GraphQL

Optimizely Graph API — GraphQL. 2 operations. Lead operation: Execute a GraphQL query. Self-contained Naftiko capability covering one Optimizely business surface.

Run with Naftiko OptimizelyGraphQL

What You Can Do

POST
Executegraphqlquery — Execute a GraphQL query
/v1/content/v2
GET
Executegraphqlqueryget — Execute a GraphQL query via GET
/v1/content/v2

MCP Tools

execute-graphql-query

Execute a GraphQL query

read-only
execute-graphql-query-get

Execute a GraphQL query via GET

read-only idempotent

Capability Spec

graph-graphql.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Optimizely Graph API — GraphQL
  description: 'Optimizely Graph API — GraphQL. 2 operations. Lead operation: Execute a GraphQL query. Self-contained Naftiko
    capability covering one Optimizely business surface.'
  tags:
  - Optimizely
  - GraphQL
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPTIMIZELY_API_KEY: OPTIMIZELY_API_KEY
capability:
  consumes:
  - type: http
    namespace: graph-graphql
    baseUri: https://cg.optimizely.com
    description: Optimizely Graph API — GraphQL business capability. Self-contained, no shared references.
    resources:
    - name: content-v2
      path: /content/v2
      operations:
      - name: executegraphqlquery
        method: POST
        description: Execute a GraphQL query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: auth
          in: query
          type: string
          description: Single key authentication token
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: executegraphqlqueryget
        method: GET
        description: Execute a GraphQL query via GET
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: auth
          in: query
          type: string
          description: Single key authentication token
        - name: query
          in: query
          type: string
          description: The GraphQL query string
          required: true
        - name: variables
          in: query
          type: string
          description: JSON-encoded query variables
        - name: operationName
          in: query
          type: string
          description: Name of the operation to execute
    authentication:
      type: apikey
      key: auth
      value: '{{env.OPTIMIZELY_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: graph-graphql-rest
    port: 8080
    description: REST adapter for Optimizely Graph API — GraphQL. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/content/v2
      name: content-v2
      description: REST surface for content-v2.
      operations:
      - method: POST
        name: executegraphqlquery
        description: Execute a GraphQL query
        call: graph-graphql.executegraphqlquery
        with:
          auth: rest.auth
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: executegraphqlqueryget
        description: Execute a GraphQL query via GET
        call: graph-graphql.executegraphqlqueryget
        with:
          auth: rest.auth
          query: rest.query
          variables: rest.variables
          operationName: rest.operationName
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: graph-graphql-mcp
    port: 9090
    transport: http
    description: MCP adapter for Optimizely Graph API — GraphQL. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: execute-graphql-query
      description: Execute a GraphQL query
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: graph-graphql.executegraphqlquery
      with:
        auth: tools.auth
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: execute-graphql-query-get
      description: Execute a GraphQL query via GET
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: graph-graphql.executegraphqlqueryget
      with:
        auth: tools.auth
        query: tools.query
        variables: tools.variables
        operationName: tools.operationName
      outputParameters:
      - type: object
        mapping: $.