| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- package wikijs
- const searchPagesQuery = `query SearchPages($query: String!, $path: String, $locale: String) {
- pages {
- search(query: $query, path: $path, locale: $locale) {
- results {
- title
- description
- path
- locale
- }
- suggestions
- totalHits
- }
- }
- }`
- const pageByIDQuery = `query GetPageById($id: Int!) {
- pages {
- single(id: $id) {
- id
- path
- title
- description
- tags {
- tag
- title
- }
- content
- createdAt
- updatedAt
- locale
- isPublished
- isPrivate
- }
- }
- }`
- const pageByPathQuery = `query GetPageByPath($path: String!, $locale: String!) {
- pages {
- singleByPath(path: $path, locale: $locale) {
- id
- path
- title
- description
- content
- createdAt
- updatedAt
- locale
- isPublished
- isPrivate
- tags {
- tag
- title
- }
- }
- }
- }`
- const listPagesQuery = `query GetAllPages($limit: Int, $locale: String, $tags: [String!]) {
- pages {
- list(limit: $limit, locale: $locale, tags: $tags) {
- id
- path
- locale
- title
- description
- createdAt
- updatedAt
- tags
- }
- }
- }`
- const listAssetFoldersQuery = `query ListAssetFolders($parentFolderId: Int!) {
- assets {
- folders(parentFolderId: $parentFolderId) {
- id
- slug
- name
- }
- }
- }`
- const listAssetsQuery = `query ListAssets($folderId: Int!, $kind: AssetKind!) {
- assets {
- list(folderId: $folderId, kind: $kind) {
- id
- filename
- ext
- kind
- mime
- fileSize
- createdAt
- updatedAt
- folder {
- id
- slug
- name
- }
- }
- }
- }`
- const createAssetFolderMutation = `mutation CreateAssetFolder(
- $parentFolderId: Int!
- $slug: String!
- $name: String!
- ) {
- assets {
- createFolder(
- parentFolderId: $parentFolderId
- slug: $slug
- name: $name
- ) {
- responseResult {
- succeeded
- errorCode
- slug
- message
- }
- }
- }
- }`
- const createPageMutation = `mutation CreatePage(
- $title: String!
- $content: String!
- $description: String!
- $editor: String!
- $isPublished: Boolean!
- $isPrivate: Boolean!
- $locale: String!
- $tags: [String]!
- $path: String!
- ) {
- pages {
- create(
- title: $title
- content: $content
- description: $description
- editor: $editor
- isPublished: $isPublished
- isPrivate: $isPrivate
- locale: $locale
- tags: $tags
- path: $path
- ) {
- responseResult {
- succeeded
- errorCode
- slug
- message
- }
- }
- }
- }`
- const updatePageMutation = `mutation UpdatePage(
- $id: Int!
- $title: String!
- $content: String!
- $description: String!
- $editor: String!
- $isPublished: Boolean!
- $isPrivate: Boolean!
- $locale: String!
- $tags: [String]!
- $path: String!
- ) {
- pages {
- update(
- id: $id
- title: $title
- content: $content
- description: $description
- editor: $editor
- isPublished: $isPublished
- isPrivate: $isPrivate
- locale: $locale
- tags: $tags
- path: $path
- ) {
- responseResult {
- succeeded
- errorCode
- slug
- message
- }
- }
- }
- }`
|