GithubHelp home page GithubHelp logo

GraphQL connection plugin about lowdefy HOT 1 CLOSED

lowdefy avatar lowdefy commented on May 19, 2024 3
GraphQL connection plugin

from lowdefy.

Comments (1)

ad-si avatar ad-si commented on May 19, 2024

For anyone looking for a workaround: This is already possible with the AxiosHttp module.
Here a short example:

lowdefy: 3.23.2
name: Lowdefy GraphQL Example

connections:
  - id: graphql_api
    type: AxiosHttp
    properties:
      baseURL: https://countries.trevorblades.com

pages:
  - id: Continents
    type: PageHeaderMenu
    requests:
      - id: continents_request
        type: AxiosHttp
        connectionId: graphql_api
        properties:
          url: /
          method: post
          data:
            query: |
              query {
                continents {
                  name
                }
              }

    events:
      onEnter:
        - id: fetch_continents
          type: Request
          params: continents_request

        - id: set_continents
          type: SetState
          params:
            continents_list:
              _request: continents_request.data.data.continents

    blocks:
      - id: title_main
        type: Title
        properties:
          content: Continents

      - id: continents_list
        type: List
        blocks:
          - id: continent_container_$
            type: Box
            style:
              background: white
              margin: 10
              padding: 10
            blocks:
              - id: continent_title_$
                type: Title
                properties:
                  level: 3
                  content:
                    _state: continents_list.$.name

A dedicated GraphQL module would be cool nevertheless!

from lowdefy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.