Code Monkey home page Code Monkey logo

uaql's Introduction

GraphQL schema for OPC UA

uses https://github.com/node-opcua/node-opcua to expose an opc ua server as a graphQL schema

demo

here

(if it says application error it's probably because I am too stingy to pay for it so it switches off 6 hours a day..)

docker

docker run -p 49161:80 -d gilesbradshaw/uaql:latest
open localhost:49161

browsing..

opc.tcp://opcua.demo-this.com:51210/UA/SampleServer

query..

{
  uaNode(nodeId: "ns=2;i=10300") {
    id
    dataValue {
      __typename
      ... on IUaDataValue {
        dataType
        arrayType
        ... on UaFloat {
          value
        }
        ... on UaInt {
          value
        }
        ... on UaDate {
          value
        }
        ... on UaBoolean {
          value
        }
        ... on UaString {
          value
        }
        ... on UaFloatArray {
          value
        }
        ... on UaIntArray {
          value
        }
        ... on UaDateArray {
          value
        }
        ... on UaBooleanArray {
          value
        }
        ... on UaStringArray {
          value
        }
      }
    }
    dataType {
      uaNode {
        nodeClass
        displayName {
          text
        }
      }
      identifierType
      value
      namespace
      namespaceUri
      serverIndex
    }
  }
}

result..

{
  "data": {
    "uaNode": {
      "id": "VUFOb2RlOm5zPTI7aT0xMDMwMA==",
      "dataValue": {
        "__typename": "UaBooleanArray",
        "dataType": "Boolean",
        "arrayType": "Array",
        "value": [
          true,
          true,
          true,
          true,
          true,
          false,
          true,
          true,
          true,
          false,
          false,
          false,
          false,
          false,
          false,
          true,
          true,
          true,
          true,
          true,
          true,
          false,
          false,
          true,
          false,
          false,
          false,
          false,
          false
        ]
      },
      "dataType": {
        "uaNode": {
          "nodeClass": "DataType",
          "displayName": {
            "text": "Boolean"
          }
        },
        "identifierType": "NUMERIC",
        "value": "1",
        "namespace": 0,
        "namespaceUri": null,
        "serverIndex": null
      }
    }
  }
}

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.