AppFrame GraphQL API
Requires X-AppFrame-Project-Access-Token header
API Endpoints
https://appframe.ru/api/v1/graphql.json
Queries
entries
Response
Returns an EntryConnection!
Example
Query
query entries(
$contentId: ID!,
$after: String,
$before: String,
$first: Int,
$last: Int,
$query: String,
$excludeFields: [String!],
$sectionCodes: [String!],
$includeSections: Boolean,
$excludeIds: [ID!],
$sortOrder1: String,
$sortOrder2: String
) {
entries(
contentId: $contentId,
after: $after,
before: $before,
first: $first,
last: $last,
query: $query,
excludeFields: $excludeFields,
sectionCodes: $sectionCodes,
includeSections: $includeSections,
excludeIds: $excludeIds,
sortOrder1: $sortOrder1,
sortOrder2: $sortOrder2
) {
nodes {
...EntryFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"contentId": "4",
"after": "abc123",
"before": "abc123",
"first": 123,
"last": 123,
"query": "abc123",
"excludeFields": ["abc123"],
"sectionCodes": ["xyz789"],
"includeSections": false,
"excludeIds": [4],
"sortOrder1": "abc123",
"sortOrder2": "xyz789"
}
Response
{
"data": {
"entries": {
"nodes": [Entry],
"pageInfo": PageInfo
}
}
}
entry
Response
Returns an Entry
Example
Query
query entry(
$contentId: ID!,
$id: ID,
$code: String,
$excludeFields: [String!],
$includeSections: Boolean
) {
entry(
contentId: $contentId,
id: $id,
code: $code,
excludeFields: $excludeFields,
includeSections: $includeSections
) {
id
createdAt
updatedAt
fields {
...FieldFragment
}
code
sections
}
}
Variables
{
"contentId": 4,
"id": "4",
"code": "abc123",
"excludeFields": ["abc123"],
"includeSections": false
}
Response
{
"data": {
"entry": {
"id": 4,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"fields": [Field],
"code": "abc123",
"sections": [4]
}
}
}
section
Response
Returns a Section
Example
Query
query section(
$contentId: ID!,
$id: ID,
$code: String,
$excludeFields: [String!],
$depth: Int
) {
section(
contentId: $contentId,
id: $id,
code: $code,
excludeFields: $excludeFields,
depth: $depth
) {
id
createdAt
updatedAt
fields {
...FieldFragment
}
name
code
sections {
...SectionFragment
}
}
}
Variables
{
"contentId": "4",
"id": "4",
"code": "abc123",
"excludeFields": ["abc123"],
"depth": 987
}
Response
{
"data": {
"section": {
"id": "4",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"fields": [Field],
"name": "xyz789",
"code": "xyz789",
"sections": [Section]
}
}
}
sections
Response
Returns a SectionConnection!
Example
Query
query sections(
$contentId: ID!,
$after: String,
$before: String,
$first: Int,
$last: Int,
$query: String,
$excludeFields: [String!],
$ids: [String!],
$depth: Int,
$sortOrder1: String,
$sortOrder2: String
) {
sections(
contentId: $contentId,
after: $after,
before: $before,
first: $first,
last: $last,
query: $query,
excludeFields: $excludeFields,
ids: $ids,
depth: $depth,
sortOrder1: $sortOrder1,
sortOrder2: $sortOrder2
) {
nodes {
...SectionFragment
}
pageInfo {
...PageInfoFragment
}
}
}
Variables
{
"contentId": 4,
"after": "abc123",
"before": "abc123",
"first": 123,
"last": 987,
"query": "xyz789",
"excludeFields": ["xyz789"],
"ids": ["xyz789"],
"depth": 123,
"sortOrder1": "xyz789",
"sortOrder2": "abc123"
}
Response
{
"data": {
"sections": {
"nodes": [Section],
"pageInfo": PageInfo
}
}
}
Types
Boolean
Description
The Boolean scalar type represents true or false.
DateTime
Description
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
Example
"2007-12-03T10:15:30Z"
Entry
EntryConnection
Field
Fields
| Field Name | Description |
|---|---|
key - String!
|
|
type - String!
|
|
jsonValue - JSON
|
|
reference - FieldReference
|
|
references - [FieldReference!]
|
Example
{
"key": "xyz789",
"type": "abc123",
"jsonValue": {},
"reference": Entry,
"references": [Entry]
}
FieldReference
Types
| Union Types |
|---|
Example
Entry
File
Fields
| Field Name | Description |
|---|---|
id - ID!
|
|
createdAt - DateTime!
|
|
updatedAt - DateTime!
|
|
alt - String
|
|
caption - String
|
|
fileStatus - FileStatus!
|
|
filename - String!
|
|
size - Int!
|
Possible Types
| File Types |
|---|
Example
{
"id": "4",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"alt": "abc123",
"caption": "xyz789",
"fileStatus": "UPLOADED",
"filename": "abc123",
"size": 987
}
FileStatus
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
"UPLOADED"
GenericFile
Example
{
"id": "4",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"alt": "xyz789",
"caption": "abc123",
"fileStatus": "UPLOADED",
"filename": "abc123",
"size": 123,
"mimeType": "abc123",
"originalFileSize": 123,
"url": "abc123"
}
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
"4"
Image
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
JSON
Description
The JSON scalar type represents JSON values as specified by ECMA-404.
Example
{}
MediaImage
Example
{
"id": "4",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"alt": "abc123",
"caption": "abc123",
"fileStatus": "UPLOADED",
"filename": "xyz789",
"size": 987,
"image": Image
}
Node
PageInfo
Section
Example
{
"id": 4,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"fields": [Field],
"name": "abc123",
"code": "abc123",
"sections": [Section]
}
SectionConnection
Fields
| Field Name | Description |
|---|---|
nodes - [Section!]!
|
|
pageInfo - PageInfo!
|
Example
{
"nodes": [Section],
"pageInfo": PageInfo
}
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"