New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

graphml-parser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphml-parser

Graph ML is for Graph Marked Lanuage, which is similar with Facebook's GraphQL, But mostly as a Domain-Specific expression in WeFlex team.

latest
Source
npmnpm
Version
1.4.0
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

GraphML Parser

NPM version Build status Dependency Status Downloads

What's the Graph ML?

Graph ML is for Graph Marked Lanuage, which is similar with Facebook's GraphQL, But mostly as a Domain-Specific expression in WeFlex team.

This libaray is for generating abstract syntax tree from given Graph ML source file.

Why create this project

WeFlex team internally takes StrongLoop's loopback framework be working with most other libraries, and we are focusing on writing more graceful codebase. Loopback's JSON model definition looks good to define SQL-like tables, but we have a document-based MongoDB to be generated for views, so we found the GraphQL is close to our needs.

This project doesn't be compatible with GraphQL, if you expect a library to parse the complete GraphQL, you should visit ooflorent/graphql-parser.

Installation

$ npm install graphml-parser --save

Usage

var graphql = require('graphml-parser');
var source = fs.readFileSync('../foo.graphml').toString('utf8');
var ast = graphql.parse(source);

The GraphML file should look like the following:

Basis {
  foo,
  bar,
  items(limit=10, status=checkin) {
    bar
  }
}

Then you will get the following tree:

{
  "type": "Basis",
  "fields": [],
  "root": {
    "fields": [
      "foo",
      "bar"
    ],
    "methods": {
      "items": {
        "type": false,
        "args": {
          "limit": 10,
          "status": "checkin"
        },
        "fields": [
          "bar"
        ]
      }
    }
  }
}

License

MIT @ WeFlex, Inc.

Keywords

graphql

FAQs

Package last updated on 20 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts