# WPGraphQL & ACF Pro Schema Contracts

> Field mapping, relationship models, and query complexity constraints across all 8 Custom Post Types.

[Canonical page](https://mifantwan.com/docs/architecture/graphql-contracts/)

Version v2.4.0 · Last reviewed 2026-08-14

## 1. Registered CPT Keys

The following WordPress Custom Post Types are exposed to WPGraphQL:

- `journal` (Plural: `journals`)
- `project` (Plural: `projects`)
- `doc` (Plural: `docs`)
- `post_it` (Plural: `postIts`)
- `hobbyist` (Plural: `hobbyists`)
- `kit_lab` (Plural: `kitLabs`)
- `shot` (Plural: `shots`)
- `contributor` (Plural: `contributors`)

## 2. ACF Field Group Normalization

All ACF fields adhere to snake_case naming in WordPress and are transformed to camelCase in the TypeScript domain layer:

```typescript
export interface NormalizedJournal {
  readingTimeMinutes: number; // Derived from acf.reading_time_override or word count
  heroMedia?: MediaItem;      // Normalized from acf.hero_media node
  dek: string;                // acf.dek summary string
}
```

## 3. Standard Query Pattern

Queries must explicitly specify needed fields and avoid deep wildcard nesting:

```graphql
query GetJournalBySlug($slug: ID!) {
  journal(id: $slug, idType: SLUG) {
    id
    databaseId
    title
    date
    journalFields {
      dek
      readingTimeOverride
      relatedDocs {
        nodes {
          slug
          title
        }
      }
    }
  }
}
```
