Field Forge auto-generates GraphQL Schema Definition Language (SDL) for every field group in your WordPress site. Combined with automatic WPGraphQL type registration, your custom fields are queryable via GraphQL with minimal configuration. This turns a notoriously painful headless WordPress workflow into a much shorter setup.
Integration scope note: Native GraphQL resolvers are verified for Field Forge scalar values, structured Group / Repeater / Flexible Content values, and object-backed
MediaItem,ContentNode, andTermNodefields.sourceUrlcan be null for non-image attachments in WPGraphQL; usemediaItemUrlwhen you need a stable file URL.userandpage_linkremain scalar in the current resolver scope.
WPGraphQL is the GraphQL API layer for WordPress. It exposes posts, pages, taxonomies, and users as a GraphQL schema that a JavaScript frontend can query. It’s excellent — except for one major gap: it doesn’t know about custom fields.
If you want to query custom fields via WPGraphQL, you traditionally have three options:
Field Forge’s approach: auto-register WPGraphQL types the moment both plugins are active. Zero code. Zero manual registration. Your custom fields become queryable via GraphQL immediately.
Both plugins must be active. WPGraphQL is the GraphQL API layer; Field Forge provides the type definitions and resolvers for custom fields.
When Field Forge is activated (or WPGraphQL is activated after Field Forge), Field Forge scans your field groups and auto-registers:
HeroSectionFields, TeamMemberFields)Your custom fields are immediately queryable:
query GetPage {
page(id: "home", idType: SLUG) {
title
fieldforge {
heroSection {
title
subtitle
backgroundImage {
id
sourceUrl
altText
mediaDetails {
width
height
}
}
ctaButton {
text
url
openInNewTab
}
}
}
}
}
The fieldforge key is added to every queryable post type, exposing the custom field groups assigned to that post.
Field Forge also lets you download the pure GraphQL Schema Definition Language (SDL) for your field groups. This is useful for:
Click Download GraphQL SDL in the Field Forge admin to get a .graphql file:
type HeroSectionFields {
title: String
subtitle: String
backgroundImage: MediaItem
ctaButton: CtaButtonGroup
}
type CtaButtonGroup {
text: String
url: String
openInNewTab: Boolean
}
type TeamMemberFields {
name: String
photo: MediaItem
bio: String
skills: [SkillSubField]
}
type SkillSubField {
skillName: String
proficiency: Int
}
GraphQL handles nested types naturally. Field Forge generates:
type TeamPage {
teamMembers: [TeamMemberRow]
}
type TeamMemberRow {
name: String
photo: MediaItem
bio: String
}
type LandingPage {
pageSections: [PageSectionLayout]
}
union PageSectionLayout = HeroLayout | FeaturesLayout | CTALayout
type HeroLayout {
title: String
subtitle: String
backgroundImage: MediaItem
}
type FeaturesLayout {
sectionTitle: String
features: [FeatureItem]
}
type CTALayout {
headline: String
button: ButtonGroup
}
Querying union types in GraphQL requires inline fragments:
query GetLandingPage {
page(id: "home", idType: SLUG) {
fieldforge {
pageSections {
__typename
... on HeroLayout {
title
subtitle
backgroundImage { sourceUrl }
}
... on FeaturesLayout {
sectionTitle
features {
title
description
}
}
... on CTALayout {
headline
button { text url }
}
}
}
}
}
This is standard GraphQL idiom. The result is a fully-typed array where each item has the right shape for its layout.
Relational fields (post object, relationship, taxonomy) resolve to WPGraphQL object types:
type ProductFields {
relatedProducts: [Post] # Post type auto-resolved to WPGraphQL's Post type
author: User # User type auto-resolved
category: [Category] # Taxonomy terms auto-resolved
}
Field Forge resolves post relationships to WPGraphQL ContentNode objects and taxonomy relationships to TermNode objects. Anonymous queries receive null or filtered lists for inaccessible private, draft, or password-protected post objects.
query GetProduct {
post(id: "product-a") {
fieldforge {
productDetails {
relatedProducts {
title
slug
featuredImage {
node {
sourceUrl
}
}
}
}
}
}
}
If you use GraphQL Code Generator in your frontend project, Field Forge’s auto-registered GraphQL schema works out of the box. Configure codegen.yml to introspect your WordPress GraphQL endpoint:
schema: https://wp.example.com/graphql
documents: './src/**/*.graphql'
generates:
./src/gql/:
preset: client
plugins: []
Run graphql-codegen and you get fully-typed GraphQL query hooks for your frontend, with Field Forge types integrated seamlessly.
WPGraphQL for ACF is a separate plugin developed by the WPGraphQL team that exposes ACF (and SCF) field groups to GraphQL. It works, but it’s a separate plugin to manage and sometimes lags behind ACF updates.
Field Forge bundles GraphQL integration as a core feature. You don’t install a separate plugin. The integration is maintained as part of Field Forge’s release cycle. Scalar, structured, media, post relationship, and taxonomy values are covered natively; user and page_link remain scalar in the current resolver scope.
For sites using ACF + WPGraphQL for ACF, switching to Field Forge means one less plugin and better integration.
GraphQL queries in a Field Forge + WPGraphQL setup benefit from Field Forge’s custom table storage and object cache integration. A complex query fetching many posts with multiple field groups runs in a few SQL queries, not the hundreds that a naive wp_postmeta-based approach would generate.
Get Field Forge — from $35/year →
GraphQL generation and WPGraphQL integration are in every paid plan.