JetEngine CCTS
Integração com o plugin JetEngine da Crocoblock.
O schema GraphQL é dotado de campos para consultar dados de Custom Content Type (CCT).
Campos raiz
| Campo | Descrição |
|---|---|
jetengineCCTEntries | Retorna uma lista de entradas CCT (tipo JetEngineCCTEntry). |
jetengineCCTEntryCount | Retorna o número de entradas CCT. |
jetengineCCTEntry | Retorna uma única entrada CCT (tipo JetEngineCCTEntry). |
O slug do CCT deve ser fornecido via argumento slug (o CCT deve estar configurado como consultável nas Configurações do plugin, veja abaixo).
Tipo JetEngineCCTEntry
No tipo JetEngineCCTEntry, podemos consultar valores de campos via:
| Campo | Descrição |
|---|---|
id | O ID do banco de dados da entrada. |
uniqueID | Um identificador único para a entrada, composto pelo slug do CCT e pelo ID da entrada. |
cctSlug | O slug do CCT ao qual esta entrada pertence. |
status | O status da entrada (ex.: publish, draft). |
createdDate | Quando a entrada foi criada. |
createdDateStr | A data de criação da entrada, formatada como string. |
modifiedDate | Quando a entrada foi modificada pela última vez. |
modifiedDateStr | A data da última modificação da entrada, formatada como string. |
authorID | O ID do autor da entrada. |
author | O objeto de conexão do usuário autor. |
singleCustomPostID | O ID do custom post vinculado, se houver. |
singleCustomPost | O objeto de conexão do custom post vinculado. |
fieldValues | Um objeto JSON com todos os campos CCT daquela entrada. |
fieldValue(slug) | Para consultar um único campo pelo slug. |
Valores dos campos CCT
Os valores de fieldValue(slug) e de cada chave em fieldValues são convertidos de acordo com o tipo de campo definido no CCT.
Campos ID implícitos (sempre convertidos para int quando presentes e não vazios): id, singleCustomPostID, authorID.
Como cada tipo de campo CCT é convertido na resposta GraphQL:
float se houver ponto decimal; caso contrário, int.true para 1, true, yes, on (sem distinção entre maiúsculas e minúsculas).int; "Both" → objeto { id, url }; caso contrário, sem alteração.int[].int; múltiplos → int[].O exemplo abaixo usa um CCT com slug "sample_cct" e campos de diferentes tipos (text, number, gallery, etc).

Executando a seguinte query:
query JetEngineCCTEntries {
jetengineCCTEntry(cctSlug: "sample_cct", by: { id: 1 }) {
label_text: fieldValue(slug: "label_text")
textarea: fieldValue(slug: "textarea")
date: fieldValue(slug: "date")
time: fieldValue(slug: "time")
datetime: fieldValue(slug: "datetime")
wysisyg: fieldValue(slug: "wysisyg")
switcher: fieldValue(slug: "switcher")
checkbox: fieldValue(slug: "checkbox")
checkbox_array: fieldValue(slug: "checkbox_array")
iconpicker: fieldValue(slug: "iconpicker")
media_id: fieldValue(slug: "media_id")
media_url: fieldValue(slug: "media_url")
media_array: fieldValue(slug: "media_array")
gallery: fieldValue(slug: "gallery")
radio: fieldValue(slug: "radio")
repeater: fieldValue(slug: "repeater")
options_select: fieldValue(slug: "options_select")
options_multiple_select: fieldValue(slug: "options_multiple_select")
number: fieldValue(slug: "number")
colorpicker: fieldValue(slug: "colorpicker")
post: fieldValue(slug: "post")
posts: fieldValue(slug: "posts")
}
}...cada campo na resposta é convertido para o seu tipo CCT:
{
"data": {
"jetengineCCTEntry": {
"label_text": "Some label",
"textarea": "Some description here\r\n\r\nSome description there",
"date": "2026-01-24",
"time": "09:13",
"datetime": "2026-03-07T08:00",
"wysisyg": "<p>Some <strong>description</strong> here</p>\n<p><em>Some description</em> there</p>\n<p>Some <a href=\"https://gatoplugins.com\">link</a></p>\n",
"switcher": true,
"checkbox": {
"one": true,
"two": false,
"three": true
},
"checkbox_array": [
"one",
"two"
],
"iconpicker": "fa fa-road",
"media_id": 1362,
"media_url": "https://gatographql.com/wp-content/uploads/GatoGraphQL-logo.webp",
"media_array": {
"id": 1380,
"url": "https://gatographql.com/wp-content/uploads/Funny-Dog.jpg"
},
"gallery": [
1361,
1362,
1363
],
"radio": "1",
"repeater": [
{
"label_(text)": "First item in repeater",
"date": "2026-01-17",
"time": "11:00",
"datetime": "2026-01-16T11:16",
"textarea": "Gato GraphQL provides a multitude of interactive clients,",
"wysiwyg": "<p>Gato GraphQL provides a <strong>multitude of interactive clients</strong>, and a user interface based on the <a href=\"https://wordpress.org\">WordPress editor</a>, so that anybody can operate it, whether a developer or not.</p>\n",
"switcher": true,
"iconpicker": "fa fa-inbox",
"media_id": 1361,
"media_url": "https://gatographql.com/wp-content/uploads/Funny-Dog.jpg",
"media_array": {
"id": 1380,
"url": "https://gatographql.com/wp-content/uploads/Funny-Dog.jpg"
},
"gallery": [
1363,
1361
],
"radio": "two",
"options_select": "three",
"options_multiple_select": [
"two",
"four"
],
"number": 22,
"colorpicker": "#757575",
"post": 1140,
"posts": [
1,
2
]
},
{
"label_(text)": "Second item in repeater",
"date": "2026-01-15",
"time": "00:18",
"datetime": "2026-01-18T00:00",
"textarea": "These clients make it very easy to interact with Gato GraphQL",
"wysiwyg": "<p>These clients <strong>make it very easy to interact with Gato GraphQL</strong>, directly within the <em>wp-admin</em> (and without the need of any PHP code), reducing friction and removing barriers so that anyone (developers and non-developers alike) can use it.</p>\n",
"switcher": false,
"iconpicker": "fa fa-search-plus",
"media_id": 1362,
"media_url": "https://gatographql.com/wp-content/uploads/LICENSE.txt",
"media_array": {
"id": 1363,
"url": "https://gatographql.com/wp-content/uploads/LICENSE.txt"
},
"gallery": [
1380,
1361,
1362
],
"radio": "three",
"options_select": "three",
"options_multiple_select": [
"three"
],
"number": 4469,
"colorpicker": "#2d2270",
"post": 2,
"posts": [
1688,
1682
]
}
],
"options_select": "1",
"options_multiple_select": [
"one",
"two",
"five"
],
"number": 66778899,
"colorpicker": "#721abf",
"post": 1,
"posts": [
1140,
1113
]
}
}
}O mesmo tipo de conversão se aplica a cada campo no JSON retornado por fieldValues:
query JetEngineCCTEntries {
jetengineCCTEntry(cctSlug: "sample_cct", by: { id: 1 }) {
fieldValues
}
}...que retorna:
{
"data": {
"jetengineCCTEntry": {
"fieldValues": {
"label_text": "Some label",
"textarea": "Some description here\r\n\r\nSome description there",
"date": "2026-01-24",
"time": "09:13",
"datetime": "2026-03-07T08:00",
"wysisyg": "<p>Some <strong>description</strong> here</p>\n<p><em>Some description</em> there</p>\n<p>Some <a href=\"https://gatoplugins.com\">link</a></p>\n",
"switcher": true,
"checkbox": {
"one": true,
"two": false,
"three": true
},
"checkbox_array": [
"one",
"two"
],
"iconpicker": "fa fa-road",
"media_id": 1362,
"media_url": "https://gatographql.com/wp-content/uploads/GatoGraphQL-logo.webp",
"media_array": {
"id": 1380,
"url": "https://gatographql.com/wp-content/uploads/Funny-Dog.jpg"
},
"gallery": [
1361,
1362,
1363
],
"radio": "1",
"repeater": [
{
"label_(text)": "First item in repeater",
"date": "2026-01-17",
"time": "11:00",
"datetime": "2026-01-16T11:16",
"textarea": "Gato GraphQL provides a multitude of interactive clients,",
"wysiwyg": "<p>Gato GraphQL provides a <strong>multitude of interactive clients</strong>, and a user interface based on the <a href=\"https://wordpress.org\">WordPress editor</a>, so that anybody can operate it, whether a developer or not.</p>\n",
"switcher": true,
"iconpicker": "fa fa-inbox",
"media_id": 1361,
"media_url": "https://gatographql.com/wp-content/uploads/Funny-Dog.jpg",
"media_array": {
"id": 1380,
"url": "https://gatographql.com/wp-content/uploads/Funny-Dog.jpg"
},
"gallery": [
1363,
1361
],
"radio": "two",
"options_select": "three",
"options_multiple_select": [
"two",
"four"
],
"number": 22,
"colorpicker": "#757575",
"post": 1140,
"posts": [
1,
2
]
},
{
"label_(text)": "Second item in repeater",
"date": "2026-01-15",
"time": "00:18",
"datetime": "2026-01-18T00:00",
"textarea": "These clients make it very easy to interact with Gato GraphQL",
"wysiwyg": "<p>These clients <strong>make it very easy to interact with Gato GraphQL</strong>, directly within the <em>wp-admin</em> (and without the need of any PHP code), reducing friction and removing barriers so that anyone (developers and non-developers alike) can use it.</p>\n",
"switcher": false,
"iconpicker": "fa fa-search-plus",
"media_id": 1362,
"media_url": "https://gatographql.com/wp-content/uploads/LICENSE.txt",
"media_array": {
"id": 1363,
"url": "https://gatographql.com/wp-content/uploads/LICENSE.txt"
},
"gallery": [
1380,
1361,
1362
],
"radio": "three",
"options_select": "three",
"options_multiple_select": [
"three"
],
"number": 4469,
"colorpicker": "#2d2270",
"post": 2,
"posts": [
1688,
1682
]
}
],
"options_select": "1",
"options_multiple_select": [
"one",
"two",
"five"
],
"number": 66778899,
"colorpicker": "#721abf",
"post": 1,
"posts": [
1140,
1113
]
}
}
}
}Concedendo acesso aos CCTs
Por padrão, nenhum CCT é consultável.
Para conceder acesso a um CCT, ele deve ser configurado como consultável nas Configurações do plugin.
Há 2 locais onde essa configuração pode ocorrer, em ordem de prioridade:
- Personalizada: Na Configuração de schema correspondente
- Geral: Na página de Configurações
Na Configuração de schema aplicada ao endpoint, selecione a opção Usar configuração personalizada e insira as entradas desejadas:

Caso contrário, serão usadas as entradas definidas na opção Queryable JetEngine CCTS na seção JetEngine CCTS das Configurações:

Queries de exemplo
Listar entradas de um CCT:
query {
jetengineCCTEntries(cctSlug: "sample_cct") {
id
uniqueID
cctSlug
status
createdDate
modifiedDate
authorID
author {
id
name
}
singleCustomPostID
singleCustomPost {
id
title
}
fieldValues
someField: fieldValue(slug: "some_field_slug")
}
}Entrada CCT única por slug e ID:
query {
jetengineCCTEntry(cctSlug: "sample_cct", by: { id: 1 }) {
id
uniqueID
cctSlug
status
createdDate
modifiedDate
author {
id
name
}
singleCustomPost {
id
title
}
fieldValues
someField: fieldValue(slug: "some_field_slug")
}
}Listar e contar entradas CCT com filtro, paginação e ordenação:
query {
jetengineCCTEntryCount(
cctSlug: "sample_cct"
filter: { search: [{ field: "cct_author_id", value: 1, operator: EQUALS }] }
)
jetengineCCTEntries(
cctSlug: "sample_cct"
filter: { search: [{ field: "cct_author_id", value: 1, operator: EQUALS }] }
pagination: { limit: 10, offset: 0 }
sort: { by: "cct_created", order: DESC }
) {
id
authorID
}
}