定制 thunder/thunder_gqls 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thunder/thunder_gqls

Composer 安装命令:

composer require thunder/thunder_gqls

包简介

GraphQL Schema for Thunder.

README 文档

README

In modules folder of a Thunder installation:

git clone git@github.com:thunder/thunder_gqls.git
drush en thunder_gqls

You can enable the thunder_demo module to have some articles to work with.

  • open admin/config/graphql in browser click "Create Server"
  • choose a label and custom endpoint to your liking.
  • Select "Composable schema" as schema and enable extensions
  • Hit "Save" button

Back on admin/config/graphql choose "Explorer" from the drop down button

If all works, you should be able to test some queries in the Explorer. For the example query you have to add the query variable {"path": "/your-path"}

Example

query ($path: String!) {
  metatags(path: $path) {
    tag
    attributes
  }
  mainMenu: menu(id: "main" path: $path) {
    name
    id
    items {
      title
      url
      inActiveTrail
      children {
        title
        url
        inActiveTrail
      }
    }
  }
  footerMenu: menu(id: "footer" path: $path) {
    name
    id
    items {
      title
      url
      inActiveTrail
      children {
        title
        url
        inActiveTrail
      }
    }
  }
  page(path: $path) {
    uuid
    url
    name
    ... on User {
      mail
    }
    ... on Channel {
      articles(offset: 0 limit: 2) {
        total
        items {
          name
          url
        }
      }
      content {
        __typename
      }
    }
    ... on Article {
      id
      url
      seoTitle
      language
      author {
        id
        name
        mail
        __typename
      }
      channel {
        url
        name
      }
      teaser {
        image {
          src
          published
          fallbackMedia {
            src
          }
        }
      }
      content {
        __typename
        ... on ParagraphPinterest {
          url
        }
        ... on ParagraphText {
          text
        }
        ... on ParagraphGallery {
          images {
            src
          }
        }
        ... on ParagraphImage {
          image {
            src
            width
            title
            alt
            name
            tags {
              name
            }
            derivative(style: "medium") {
              src
              width
            }
            focalPoint {
              x
              y
            }
          }
        }
        ... on ParagraphLink {
          links {
            url
            title
          }
        }
      }
    }
  }
}

统计信息

  • 总下载量: 1.28k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固