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!

Arguments
Name Description
contentId - ID!
after - String
before - String
first - Int
last - Int
query - String
excludeFields - [String!]
sectionCodes - [String!]
includeSections - Boolean
excludeIds - [ID!]
sortOrder1 - String
sortOrder2 - String

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

Arguments
Name Description
contentId - ID!
id - ID
code - String
excludeFields - [String!]
includeSections - Boolean

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

Arguments
Name Description
contentId - ID!
id - ID
code - String
excludeFields - [String!]
depth - Int

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!

Arguments
Name Description
contentId - ID!
after - String
before - String
first - Int
last - Int
query - String
excludeFields - [String!]
ids - [String!]
depth - Int
sortOrder1 - String
sortOrder2 - String

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

Fields
Field Name Description
id - ID!
createdAt - DateTime!
updatedAt - DateTime!
fields - [Field!]!
code - String
sections - [ID!]
Example
{
  "id": 4,
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "fields": [Field],
  "code": "abc123",
  "sections": ["4"]
}

EntryConnection

Fields
Field Name Description
nodes - [Entry!]!
pageInfo - PageInfo!
Example
{
  "nodes": [Entry],
  "pageInfo": PageInfo
}

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

Entry

MediaImage

GenericFile

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

MediaImage

GenericFile

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

UPLOADED

PROCESSING

READY

FAILED

Example
"UPLOADED"

GenericFile

Fields
Field Name Description
id - ID!
createdAt - DateTime!
updatedAt - DateTime!
alt - String
caption - String
fileStatus - FileStatus!
filename - String!
size - Int!
mimeType - String!
originalFileSize - Int!
url - String!
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

Fields
Field Name Description
height - Int!
width - Int!
thumbhash - String!
url - String!
Example
{
  "height": 987,
  "width": 987,
  "thumbhash": "abc123",
  "url": "xyz789"
}

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

Fields
Field Name Description
id - ID!
createdAt - DateTime!
updatedAt - DateTime!
alt - String
caption - String
fileStatus - FileStatus!
filename - String!
size - Int!
image - Image!
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

Fields
Field Name Description
id - ID!
createdAt - DateTime!
updatedAt - DateTime!
fields - [Field!]!
Possible Types
Node Types

Entry

Section

Example
{
  "id": 4,
  "createdAt": "2007-12-03T10:15:30Z",
  "updatedAt": "2007-12-03T10:15:30Z",
  "fields": [Field]
}

PageInfo

Fields
Field Name Description
endCursor - String
hasNextPage - Boolean!
hasPreviousPage - Boolean!
startCursor - String
Example
{
  "endCursor": "xyz789",
  "hasNextPage": true,
  "hasPreviousPage": false,
  "startCursor": "abc123"
}

Section

Fields
Field Name Description
id - ID!
createdAt - DateTime!
updatedAt - DateTime!
fields - [Field!]!
name - String!
code - String!
sections - [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"