# Minimal OpenAPI 3 description for Phoenix API GraphQL endpoint.
# Full schema: GET /graphql/schema (SDL). Interactive: /graphql-playground
openapi: 3.0.3
info:
  title: Phoenix API — GraphQL
  description: Sankofa Phoenix API GraphQL endpoint. Auth via JWT (Bearer) or X-API-Key for /api/v1/*.
  version: 1.0.0
servers:
  - url: http://localhost:4000
    description: Default
paths:
  /graphql:
    post:
      summary: GraphQL query or mutation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [query]
              properties:
                query: { type: string }
                operationName: { type: string }
                variables: { type: object }
      responses:
        '200':
          description: GraphQL response (data or errors)
        '401':
          description: Unauthorized (optional; many operations allow unauthenticated)
  /graphql/schema:
    get:
      summary: GraphQL schema (SDL)
      responses:
        '200':
          description: Schema as text/plain
  /graphql-playground:
    get:
      summary: GraphQL docs and Sandbox link
      responses:
        '200':
          description: HTML with endpoint and schema links
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
