Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
139 lines (129 sloc) 2.07 KB
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
type Mutation {
"""
Sets the locale (for example, "en-US")
"""
setLocale(locale: String!): BackendConfig
}
type Subscription {
"""
Temporary placeholder field
"""
_: Boolean
}
type Query {
"""
Returns a compiled backend config
"""
backendConfig: BackendConfig
"""
URL-resolve query
"""
url(path: String!): Url
}
"""
Dynamic URL type
"""
type Url {
"""
Entity ID
"""
id: String!
"""
Canonical URL for the found entity
"""
path: String!
"""
Entity type (this is being used by Dynamic Routing)
"""
type: String!
"""
Redirect flag if the given URL must be redirected to the specified "path" URL
"""
redirect: Boolean
}
"""
Returns a compiled config object for all supported backends
"""
type BackendConfig {
"""
List of supported locales (for example: `["en-US", "nl-NL"]`)
"""
locales: [String]
"""
Current active locale (for example, `en-US`)
"""
activeLocale: String
}
"""
Pagination type (used for listing the response data)
"""
type Pagination {
"""
Total number of pages ("totalItems"/"perPage")
"""
totalPages: Int!
"""
Total number of items of the request
"""
totalItems: Int!
"""
Number items per page
"""
perPage: Int!
"""
Current page index
"""
currentPage: Int!
"""
Next page index (unless "currentPage" != "totalPages")
"""
nextPage: Int
"""
Previous page index (unless "currentPage" != 1)
"""
prevPage: Int
}
"""
Sort order direction enumeration, defines direction of sorting
"""
enum SortOrderDirection {
"""
A -> Z (0 -> 9)
"""
asc
"""
Z -> A (9 -> 0)
"""
desc
}
"""
Sort order input (it's being used to sort the requested data on the backend)
"""
input SortOrderInput {
"""
Perform sorting by this field
"""
field: String!
"""
Sort order direction
"""
direction: SortOrderDirection
}
"""
Pagination input (it's used for querying paginated data)
"""
input PaginationInput {
"""
Current page
"""
page: Int
"""
Limit items per page
"""
perPage: Int
}