# 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 version **1.4.0** (published 2016-01-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install graphml-parser
pnpm add graphml-parser
yarn add graphml-parser
bun add graphml-parser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2016-01-20 |
| First published | 2016-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yorkie Liu |
| Maintainers | yorkie |
| Keywords | graphql, graphml, parser, ast |

## Links

- npm: https://www.npmjs.com/package/graphml-parser
- Repository: https://github.com/weflex/graphml-parser
- Homepage: https://github.com/weflex/graphml-parser#readme
- Issues: https://github.com/weflex/graphml-parser/issues
- npm.io page: https://npm.io/package/graphml-parser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2016-01-20
- 1.3.2 — 2016-01-19
- 1.3.1 — 2016-01-19
- 1.3.0 — 2016-01-19
- 1.2.0 — 2016-01-19
- 1.1.0 — 2016-01-19

## README

# GraphML Parser

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Dependency Status][david-image]][david-url]
[![Downloads][downloads-image]][downloads-url]

**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](https://github.com/ooflorent/graphql-parser).

## Installation

```sh
$ npm install graphml-parser --save
```

## Usage

```js
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:

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

## License

MIT @ WeFlex, Inc.

[npm-image]: https://img.shields.io/npm/v/graphml-parser.svg?style=flat-square
[npm-url]: https://npmjs.org/package/graphml-parser
[travis-image]: https://img.shields.io/travis/weflex/graphml-parser.svg?style=flat-square
[travis-url]: https://travis-ci.org/weflex/graphml-parser
[david-image]: http://img.shields.io/david/weflex/graphml-parser.svg?style=flat-square
[david-url]: https://david-dm.org/weflex/graphml-parser
[downloads-image]: http://img.shields.io/npm/dm/graphml-parser.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/graphml-parser

---
_Source: https://npm.io/package/graphml-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
