| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- 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
- }
- }
- }`
- const pageByPathQuery = `query GetPageByPath($path: String!, $locale: String!) {
- pages {
- singleByPath(path: $path, locale: $locale) {
- id
- path
- title
- description
- content
- createdAt
- updatedAt
- locale
- 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 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
- }
- }
- }
- }`
|