Default Types and Fields


目录

On this page you will find information about the default Types and Fields that are generated by WPGraphQL.

The Types registered by WPGraphQL can be used by 3rd party plugins that are registering GraphQL fields, connections, arguments and inputs.

Types must be unique in the Schema, so any Type already declared by WPGraphQL should not be re-declared by plugins extending WPGraphQL.

De-registering or removing Types from the Schema is not supported.

Scalars

WPGraphQL registers the following Scalars for use throughout the Schema.

Standard GraphQL Scalars

Custom Scalars

For more information about custom scalars and how to create your own, see the Custom Scalars documentation.

Interfaces

Next, WPGraphQL registers Interfaces. Interfaces are special Types that declare common fields that Object Types have in common. The following Interfaces are registered by default:

Object Types

Next, Object Types are registered to represent common Types of data managed in WordPress.

Enums

Inputs

Unions

Connections

Connections are composed of many Types. Each connection registered creates a Type in the Schema named after the FromType and ToType, and creates additional Types for "Where" args to filter and sort the connections.

Connections are registered from Connected Types to the following.

For example, Connections are registered from the RootQuery to Comments, from Users to Comments, from Posts to Comments, etc.

Mutations

WPGraphQL generates the following Mutations:


版本号 #1
由 壳壳虫 创建于 2026-08-29 23:36:26 UTC
由 壳壳虫 更新于 2026-08-29 23:36:26 UTC