graphql / libgraphqlparser Goto Github PK
View Code? Open in Web Editor NEWA GraphQL query parser in C++ with C and C++ APIs
License: MIT License
A GraphQL query parser in C++ with C and C++ APIs
License: MIT License
ArrayValue
isn't referenced in the spec but ListValue
is https://facebook.github.io/graphql/#sec-List-Value.
With a query like:
{
field(input: {a: ["bar"])
}
I get something like:
"value": {
"kind": "ArrayValue",
...
}
I'd expect:
"value": {
"kind": "ListValue",
...
}
which would mirror the spec
I'm looking for libgraphqlparser.pc.in
in the Cellar library from a homebrew (brew install libgraphqlparser
) installation and can't find it. Would be useful to have this available. How can we make this available?
In addition to extending types, GraphQL also allows to extend interfaces. This seems currently not supported by libgraphqlparser, though, which fails with an exception of the type:
Parser failed with error: <line.column-length>: syntax error, unexpected interface, expecting type
Hello! Thank you for your open source contribution. We're trying to package this up for easy install through Homebrew and are using the 0.1.0 release tag for the tar.gz
packaging. However 0.1.0 doesn't have the make install
task. Could you please create a new release with the make install
task?
Thanks!
I created a Perl binding for the library; it lives here: https://github.com/gonzus/Parser-GraphQL-XS
Can you add a pointer to it in your list of bindings / implementation languages?
Thanks!
I was running some tests and found that graphql_ast_to_json() doesn't produce a valid json for this sample graphql query here.
Specifically, it produces an unexpected token ",". Here's the output dump.
I use the output of this to build the elixir interface - aarvay/graphql_parser
If I missed something, my apologies, please point me in the right direction.
I would like to wrap this library in Perl. For that I need the C binding built as a dynamic library. This seems not to be supported out of the box.
I added a simple Makefile for my own purposes, and have no problem in creating a pull request for it. But since the project uses cmake, perhaps you would rather do this differently?
Thanks!
A couple weeks ago they updated support for nullish values in the query kitchen sink. If this test could be added, that would great!
{
unnamed(truthy: true, falsey: false, nullish: null),
query
}
Thank you,
Barret
I use Shopify/graphql-parser to write following ruby code but crashed in C
def visit_argument(arg)
key = arg.name.value
# TODO crashed in C trace
value_obj = arg.value
end
I debug the C code in graphql-parser, the visit_argument should defined in https://github.com/Shopify/graphql-parser/blob/master/ext/graphql_parser/graphql_ruby.c#L220
I'm new on both C and C++, so I don't know how to debug them.
I report an issue on https://github.com/Shopify/graphql-parser/issues/14 with C error trace but the shopify seems not maintenance the lib anymore.
Btw, The problem seems related to https://github.com/Shopify/graphql-parser/issues/4. But I just not understand it well.
Thanks for any help.
Any reason that ast::Node::accept()
is not const
?
It would be great to create a nested visitor while visiting and we can't call accept()
on any nested nodes because we always have const
pointers or references to them.
CMake 3.1.0 is required to configure the buildsystem.
From what I can tell 3.1.0 is only needed for setting the C++ standard to C++11.
Unfortunately, even a recent Ubuntu 15.04 only comes with CMake 3.0.2.
It would be great to make it work with older CMake versions by putting some code in to add the appropriate flag manually. Yes, I know this needs some lines of code, but otherwise you force the user to upgrade CMake only for setting the C++ standard (or, like me, comment the line out and set -std=c++11 manually).
https://github.com/Shopify/graphql-parser and https://rubygems.org/gems/graphql-parser
Is there a list of bindings somewhere I should add these too?
I've noticed that the graphql/graphql-js
repository has been updated to the MIT license, which had been announced in: https://code.facebook.com/posts/121714468491809/relicensing-the-graphql-specification/
Is this repository also going to be updated to the MIT license?
The readme says:
To run tests, please download googletest from https://github.com/google/googletest/archive/release-1.8.0.zip and unzip it in the test subdirectory.
And that's it. I downloaded googletest in the test directory, ran cmake . and then tried with several make targets, but they all failed:
libgraphqlparser/test/ParserTests.cpp:13:10: fatal error: 'Ast.h' file not found
(after adding symlinks for the missing header files)
libgraphqlparser/test/Ast.h:237:43: error: a space is required between consecutive right angle brackets (use '> >')
I am pretty sure I missed a step here. Could some more detailed info be provided in the readme? Perhaps add a test/README.md
?
https://github.com/Shopify/graphql-parser gives me 404
Descriptions allow to annotate definitions in a GraphQL schema with human-readable content, which is also made available via introspection. It seems that libgraphqlparser currently fails when encountering descriptions with an exception of the following type:
Parser failed with error: <line.column-length>: syntax error, unexpected STRING, expecting EOF
@swolchok Great work, reached out to you on twitter as well.
I am doing OCaml bindings, https://github.com/fxfactorial/ocaml-graphql, and a server for graphql and have some questions.
(Installed from source)
#include <graphqlparser/JsonVisitor.h>
and getting/usr/local/include/graphqlparser/JsonVisitor.h:13:10: fatal error: 'AstVisitor.h' file not found
#include "AstVisitor.h"
^
1 error generated.
Mistake in the cmake installation?
Why is there a nested libgraphqlparser inside of graphqlparser in the installed headers?/
Twitter question
is graphql_ast_to_json
intended just for debugging or is the graphql server intended to relevant info out of that and then do with the data as it wills, ie querying postgres, redis, etc. What are some more example C++ API based usages of the AST
Did you intentionally leave out the v
in the tag name this time? I don't care either way but just wanted to check.
Not sure how much work this is to implement but support for graphql-js compatible subscriptions (maybe with an experimental flag or something?) would be super-useful and really appreciated.
I (very foolishly) assumed libgraphqlparser would support subscriptions when we started building on top of it. Now we've got a whole ruby GraphQL DSL built and nowhere to subscribe :(
Related Conversations:
If I'm reading the spec right, type definitions which implement multiple interfaces should have a &
separator between the interface names and optionally before the first interface name for a single interface. The parser rule for implements_interfaces_opt
in parser.ypp only expects whitespace.
The README should clarify about the thread safety of the library so it's clearer if/how to use on multithreaded environments.
Using the latest bison
and flex
from homebrew:
Jeroens-MacBook-Pro:libgraphqlparser jeroen$ make
[ 4%] [FLEX][GraphQLScanner] Building scanner with flex 2.6.4
[ 8%] Generating Ast.h
[ 13%] Generating Ast.cpp
[ 17%] Generating AstVisitor.h
[ 21%] Generating c/GraphQLAst.h
[ 26%] Generating c/GraphQLAst.cpp
[ 30%] Generating c/GraphQLAstForEachConcreteType.h
[ 34%] Generating JsonVisitor.h.inc
[ 39%] Generating JsonVisitor.cpp.inc
[ 43%] [BISON][graphqlparser_bison] Building parser with bison 3.2.1
parser.ypp:8.10-12: error: invalid version requirement: 3
%require "3"
^^^
make[2]: *** [parser.tab.cpp] Error 1
make[1]: *** [CMakeFiles/graphqlparser.dir/all] Error 2
make: *** [all] Error 2
I can change the require to from "3" to "3.0" which works but I still get these warnings:
[ 43%] [BISON][graphqlparser_bison] Building parser with bison 3.2.1
parser.ypp:298.17-43: warning: unset value: $$ [-Wother]
start: document { *outAST = $1; }
^^^^^^^^^^^^^^^^^^^^^^^^^^^
parser.ypp:446.23-26: warning: unused value: $2 [-Wother]
"..." "on" type_condition directives_opt selection_set { $$ = new InlineFragment(@$, $3, $4, $5); }
^^^^
parser.ypp:451.17-26: warning: unused value: $1 [-Wother]
"fragment" fragment_name "on" type_condition directives_opt selection_set { $$ = new FragmentDefinition(@$, $2, $4, $5, $6); }
^^^^^^^^^^
parser.ypp:451.42-45: warning: unused value: $3 [-Wother]
"fragment" fragment_name "on" type_condition directives_opt selection_set { $$ = new FragmentDefinition(@$, $2, $4, $5, $6); }
^^^^
parser.ypp:488.17-20: warning: unused value: $1 [-Wother]
boolean_value: TRUE { $$ = new BooleanValue(@$, true); }
^^^^
parser.ypp:489.17-21: warning: unused value: $1 [-Wother]
| FALSE { $$ = new BooleanValue(@$, false); }
^^^^^
parser.ypp:492.17-20: warning: unused value: $1 [-Wother]
null_value: NULL { $$ = new NullValue(@$); }
^^^^
parser.ypp:597.20-25: warning: unused value: $1 [-Wother]
schema_definition: SCHEMA directives_opt "{" operation_type_definition_list "}" { $$ = new SchemaDefinition(@$, $2, $4); }
^^^^^^
parser.ypp:609.25-30: warning: unused value: $1 [-Wother]
scalar_type_definition: SCALAR name directives_opt { $$ = new ScalarTypeDefinition(@$, $2, $3); }
^^^^^^
parser.ypp:612.25-28: warning: unused value: $1 [-Wother]
object_type_definition: TYPE name implements_interfaces_opt directives_opt "{" field_definition_list "}" { $$ = new ObjectTypeDefinition(@$, $2, $3, $4, $6); }
^^^^
parser.ypp:616.17-26: warning: unused value: $1 [-Wother]
| IMPLEMENTS type_name_list { $$ = $2; }
^^^^^^^^^^
parser.ypp:644.28-36: warning: unused value: $1 [-Wother]
interface_type_definition: INTERFACE name directives_opt "{" field_definition_list "}" { $$ = new InterfaceTypeDefinition(@$, $2, $3, $5); }
^^^^^^^^^
parser.ypp:647.24-28: warning: unused value: $1 [-Wother]
union_type_definition: UNION name directives_opt "=" union_members { $$ = new UnionTypeDefinition(@$, $2, $3, $5); }
^^^^^
parser.ypp:654.23-26: warning: unused value: $1 [-Wother]
enum_type_definition: ENUM name directives_opt "{" enum_value_definition_list "}" { $$ = new EnumTypeDefinition(@$, $2, $3, $5); }
^^^^
parser.ypp:665.31-35: warning: unused value: $1 [-Wother]
input_object_type_definition: INPUT name directives_opt "{" input_value_definition_list "}" { $$ = new InputObjectTypeDefinition(@$, $2, $3, $5); }
^^^^^
parser.ypp:668.28-33: warning: unused value: $1 [-Wother]
type_extension_definition: EXTEND object_type_definition { $$ = new TypeExtensionDefinition(@$, $2); }
^^^^^^
parser.ypp:671.23-31: warning: unused value: $1 [-Wother]
directive_definition: DIRECTIVE "@" name arguments_definition_opt ON directive_locations { $$ = new DirectiveDefinition(@$, $3, $4, $6); }
^^^^^^^^^
parser.ypp:671.67-68: warning: unused value: $5 [-Wother]
directive_definition: DIRECTIVE "@" name arguments_definition_opt ON directive_locations { $$ = new DirectiveDefinition(@$, $3, $4, $6); }
^^
I'm wondering why the dependency on the graphql gem? If the only thing I want is to parse a query into that nice Ruby structure, why do I need the graphql gem?
Hi, thank you for this project!
I am very new to GraphQL so forgive me if I am asking naive questions :).
I am considering implementing a graphql server in C++, and while I see that libgraphqlparser offer parsing of a graphql query, I could not find if it offers creating of Schema and executing query against it?
I know that in other languages(js) the idea is to generate the schema and then when query arrives it is parsed, validated and executed against the schema, so that is why I am looking for the libraries that would support the same thing in C++.
If there is support, would you mind sharing some code examples? Thanks!
Since ctypesgen 0.1.1 (now 1.0.0) it has installed as "ctypesgen" instead of "ctypesgen.py" so CMakeLists.txt can't find the executable.
The fix is trivial:
FIND_PROGRAM(CTYPESGEN_FOUND ctypesgen.py)
IF (NOT CTYPESGEN_FOUND)
FIND_PROGRAM(CTYPESGEN_FOUND ctypesgen)
ENDIF()
If that's acceptable I'll push a PR.
Thanks
GraphQL allows to extend schemas, i.e.:
[...] to represent a schema which has been extended from an original schema. For example, this might be used by a GraphQL service which adds additional operation types, or additional directives to an existing schema.
libgraphqlparser currently does not support the parsing schema definitions including schema extensions.
To make building this library possible on systems without / with outdated Flex / Bison libraries, generated files are checked into this repository. These files, for example parser.tab.cpp or position.hh, have the GPL license.
GraphQL types may implement multiple interfaces, which are denoted with an ampersand (e.g., type A implements B & C
). Currently, libgraphqlparser does not support this ability and fails with an exception of the type:
Parser failed with error: <line.column>: unrecognized character &
This library's license was changed from BSD + patent grants to MIT in March 2018. However, the CONTRIBUTING.md file still states the license to be BSD.
For example: Given I have a handle to a GraphQLAstSelectionSet
, I can access the number of selections contained within it by calling GraphQLAstSelectionSet_get_selections_size
. But how do I get a handle to a specific selection in the list? Is there a way to enumerate the selections contained within the selection set without resorting to visitors?
This also applies to other nodes with subnode lists, e.g. Document -> definitions, FragmentSpread -> directives etc.
Disclaimer: As I'm fairly new to all this stuff, I may be missing something really obvious here.
And GCC6:
c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-devel/include" -DNDEBUG -I. -Ic -I"C:/Users/Jeroen/Documents/R/win-library/3.4/Rcpp/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -D__USE_MINGW_ANSI_STDIO -O2 -Wall -mtune=core2 -c JsonVisitor.cpp -o JsonVisitor.o
JsonVisitor.cpp: In member function 'void facebook::graphql::ast::visitor::JsonVisitor::printChildList(const const_iterator&, size_t)':
JsonVisitor.cpp:41:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < numChildren; ++ii) {
^
g++ -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer -fno-sanitize=object-size,vptr -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -Ic -I/usr/local/include -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -pipe -Wall -pedantic -O2 -mtune=native -c lexer.cpp -o lexer.o
lexer.lpp: In function ‘int yylex(yystype*, yy::location*, yyscan_t)’:
lexer.lpp:89:33: warning: format ‘%x’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘int*’ [-Wformat=]
sscanf(yytext + 1, "%x", &ch);
And on Xcode8:
lexer.cpp:796:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
lexer.cpp:797:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
lexer.cpp:797:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
lexer.cpp:798:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register int yy_act;
^~~~~~~~~
lexer.cpp:856:4: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
^~~~~~~~~
lexer.cpp:1326:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
^~~~~~~~~
lexer.cpp:1327:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *source = yyg->yytext_ptr;
^~~~~~~~~
lexer.cpp:1328:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register int number_to_move, i;
^~~~~~~~~
lexer.cpp:1328:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register int number_to_move, i;
^~~~~~~~~
lexer.cpp:1460:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
lexer.cpp:1461:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *yy_cp;
^~~~~~~~~
lexer.cpp:1468:3: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
^~~~~~~~~
lexer.cpp:1493:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register int yy_is_jam;
^~~~~~~~~
lexer.cpp:1495:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register char *yy_cp = yyg->yy_c_buf_p;
^~~~~~~~~
lexer.cpp:1497:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
register YY_CHAR yy_c = 1;
^~~~~~~~~
Performing fuzzy testing on libgraphqlparser. Libfuzzer and Valgrind complain of memory leaks. For an input file with content
{d }#s
b{a }
376 (48 direct, 328 indirect)
yy::GraphQLParserImpl::parse() (parser.ypp:336)
facebook::graphql::doParse(char const**, void*, bool)(GraphQLParser.cpp:24)
Probably parser trying to create new document for second line without deleting first one which was created for line1 "{d }#s".
Per the README.md
Linux or Mac OS are listed as requirements. It would be useful to support building on Windoes.
I gave it a try and there's a few errors, but I was able to hack something together.
I'm looking at the location values for https://github.com/graphql/libgraphqlparser/blob/master/test/schema-kitchen-sink.json and https://github.com/graphql/libgraphqlparser/blob/master/test/kitchen-sink.json.
Both the kitchen sink (request) and schema kitchen sink GraphQL test inputs have comments and white space for the first 7-8 lines. But the locations in the JSON output say the documents start at line 2 and finish before the definitions are done.
Does libgraphqlparser remove comment only lines? The JSON locations do not match the original text definition locations. (Trying to make my print statements match the error information)
(Thank you for the line number addition!)
Currently, the parser considers multi-line block strings wrongly to be placed in a single long line. For example, this block string is considered to have the location:
{"start": {"line": 49,"column":56}, "end": {"line":49,"column":96}}"
...whereas it should end in line 53, column 6. Subsequent locations are correspondingly off by a few lines.
I'm trying to write bindings for the Rust programming language. Is there a way to statically link this project?
Spec: graphql/graphql-spec#96
Reference: graphql/graphql-js#186
I am running into trouble when using libgraphqlparser in combination with GraphQL schemas that rely on the ID
scalar type, which is part of the GraphQL specification.
Looking at the types defined for this library, it seems that the ID
scalar type is currently not yet supported. Is that correct?
I tried to publish libgraphqlparser
bindings but they were rejected because you LICENSE
says BSD but the reposity contains several GPL files...
I have both python 3.5 and 2.7 installed in my machine (Arch Linux) but whenever I run the cmake .
command it always picks /usr/bin/python
which links to 3.5.
Currently I just made /usr/bin/python
to point into 2.7 but it would be better if the build script would pick the correct one.
Hi!
I'm creating a PHP extension on top of this library, but I'm having trouble using the C API, these two includes seem to be wrong: https://github.com/graphql/libgraphqlparser/blob/master/c/GraphQLAstVisitor.h#L12-L13
I'm missing something or this is a bug?
I've been spending time improving my Travis build times, and my final remaining task to switch to their container infrastructure is to get rid of the sudo make install
required by libgraphqlparser
.
I've spelunked the Makefile a little but I don't see an obvious way to encourage the installer to build to a directory I have access to instead of /usr/local/include/graphqlparser
. Any suggestions?
The custom commands in the CmakeLists are hardcoded to expect building from the root directory.
Steps to reproduce:
> mkdir build && cd build
> cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build .
Filtered warnings:
python: can't open file './ast/ast.py': [Errno 2] No such file or directory
It would be great to allow or even prefer out of source builds.
Build dump_json_ast
with -fsanitize=address
on Linux x86_64:
$ clang --version
clang version 3.7.0 (https://github.com/llvm-mirror/clang.git 40b68b4c02b9d9e1e4138815747adf5589496240) (https://github.com/llvm-mirror/llvm.git dccade93466c50834dbaa5f4dabb81e90d768c40)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ mkdir build && cd build
$ env CXX=clang++ CXXFLAGS='-fsanitize=address -ggdb' cmake ..
$ make
and execute the following command:
$ echo -ne '\x7b\x0a\x20\x75\x30\x30\x30\x28\x69\x30\x3a\x20\x39\x30\x45' | ./dump_json_ast
Output:
Parser failed with error: 2.14: syntax error, unexpected EOF, expecting :
=================================================================
==5216==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 96 byte(s) in 2 object(s) allocated from:
#0 0x4df280 in operator new(unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x7f5672faabc6 in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:232:28
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x4df280 in operator new(unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x7f5672fadc7f in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:329:36
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Indirect leak of 56 byte(s) in 1 object(s) allocated from:
#0 0x4df280 in operator new(unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x7f5672fadefd in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:333:32
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Indirect leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x4df280 in operator new(unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x7f5672faebcb in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:363:32
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Indirect leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x4df280 in operator new(unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x7f5672faabc6 in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:232:28
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Indirect leak of 10 byte(s) in 3 object(s) allocated from:
#0 0x477266 in __interceptor_strdup llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:590
#1 0x7f5672faac75 in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:232:59
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Indirect leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x4df280 in operator new(unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:62
#1 0x7f5672fc307b in __gnu_cxx::new_allocator<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> > >::allocate(unsigned long, void const*) /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ext/new_allocator.h:104:27
#2 0x7f5672fc2c96 in std::_Vector_base<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> >, std::allocator<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> > > >::_M_allocate(unsigned long) /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/stl_vector.h:168:27
#3 0x7f5672fc20bb in void std::vector<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> >, std::allocator<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> > > >::_M_emplace_back_aux<facebook::graphql::ast::Argument*&>(facebook::graphql::ast::Argument*&) /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/vector.tcc:404:22
#4 0x7f5672fb4d6a in void std::vector<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> >, std::allocator<std::unique_ptr<facebook::graphql::ast::Argument, std::default_delete<facebook::graphql::ast::Argument> > > >::emplace_back<facebook::graphql::ast::Argument*&>(facebook::graphql::ast::Argument*&) /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/vector.tcc:101:4
#5 0x7f5672fadd6b in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:329:82
#6 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#7 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#8 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#9 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
Indirect leak of 3 byte(s) in 1 object(s) allocated from:
#0 0x477266 in __interceptor_strdup llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:590
#1 0x7f5672faec59 in yy::GraphQLParserImpl::parse() libgraphqlparser/build/parser.ypp:363:61
#2 0x7f5672fd991b in facebook::graphql::doParse(char const**, void*) libgraphqlparser/GraphQLParser.cpp:26:17
#3 0x7f5672fd9c0c in facebook::graphql::parseFile(_IO_FILE*, char const**) libgraphqlparser/GraphQLParser.cpp:48:17
#4 0x4e222f in main libgraphqlparser/dump_json_ast.cpp:35:14
#5 0x7f5671d89aa4 in __libc_start_main (/lib64/libc.so.6+0x21aa4)
SUMMARY: AddressSanitizer: 293 byte(s) leaked in 11 allocation(s).
@schloerke has found in our R bindings that the kitchen sink example produces invalid JSON:
curl -OL https://raw.githubusercontent.com/graphql/graphql-js/master/src/language/__tests__/kitchen-sink.graphql
./dump_json_ast kitchen-sink.graphql
The output has an invalid trailing comma (which you can validate on http://pro.jsonlint.com)
The readme for libgraphqlparser includes this snippet:
you can use it as the basis for an extension module for your favorite programming language instead of writing your own parser from scratch.
SWIG may help with this use case. It's a tool that generates glue code to call C++ APIs from other languages. It supports lots of different languages, including C#, Java, Python, Go, PHP, and Ruby. I've used it before to call a C++ API from Java and it worked pretty well for that use case.
It would be cool to include 'official' SWIG bindings to more easily allow this library to be used from other languages.
Hi,
I got two issues trying out this package
❯❯❯ go build master ◼
# _/Users/bsr/Work/Programming/cpp/sample/libgraphqlparser/go
In file included from ./gotest.go:16:
../c/GraphQLAstVisitor.h:12:10: fatal error: 'c/GraphQLAst.h' file not found
#include "c/GraphQLAst.h"
^
1 error generated.
I corrected it by changing
#include "./GraphQLAst.h"
#include "./GraphQLAstForEachConcreteType.h"
from
#include "c/GraphQLAst.h"
#include "c/GraphQLAstForEachConcreteType.h"
then
go build master ◼
# _/Users/bsr/Work/Programming/cpp/sample/libgraphqlparser/go
./callbacks.go:14:10: warning: implicit declaration of function 'printField' is invalid in C99 [-Wimplicit-function-declaration]
~/W/P/c/s/l/go ❯❯❯ ls master ✱ ◼
README.md callbacks.go go gotest.go
~/W/P/c/s/l/go ❯❯❯ ./go master ✱ ◼
field : myfield
Example error: 1.18-19: syntax error, unexpected on, expecting ( or @ or {
comple log is below
~/W/P/c/sample ❯❯❯ git clone https://github.com/graphql/libgraphqlparser.git ⏎
Cloning into 'libgraphqlparser'...
remote: Counting objects: 161, done.
remote: Total 161 (delta 0), reused 0 (delta 0), pack-reused 161
Receiving objects: 100% (161/161), 105.33 KiB | 0 bytes/s, done.
Resolving deltas: 100% (80/80), done.
Checking connectivity... done.
~/W/P/c/sample ❯❯❯ cd libgraphqlparser
AstNode.h GraphQLParser.h PATENTS dump_json_ast.cpp lexer.lpp parser.ypp syntaxdefs.h
CMakeLists.txt JsonVisitor.cpp README.md go location.hh position.hh test
CONTRIBUTING.md JsonVisitor.h ast lexer.cpp parser.tab.cpp python
GraphQLParser.cpp LICENSE c lexer.h parser.tab.hpp stack.hh
~/W/P/c/s/libgraphqlparser ❯❯❯ make install master
make: *** No rule to make target `install'. Stop.
~/W/P/c/s/libgraphqlparser ❯❯❯ cmake . ⏎ master
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.5")
-- Found BISON: /usr/local/bin/bison (found suitable version "3.0.4", minimum required is "3")
-- Found FLEX: /usr/bin/flex (found version "2.5.35")
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
graphqlparser
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/bsr/Work/Programming/cpp/sample/libgraphqlparser
~/W/P/c/s/libgraphqlparser ❯❯❯ make install master
[ 5%] Generating Ast.h
[ 10%] Generating Ast.cpp
[ 15%] Generating AstVisitor.h
[ 20%] Generating c/GraphQLAst.h
[ 25%] Generating c/GraphQLAst.cpp
[ 30%] Generating c/GraphQLAstForEachConcreteType.h
Scanning dependencies of target graphqlparser
[ 35%] Building CXX object CMakeFiles/graphqlparser.dir/JsonVisitor.cpp.o
[ 40%] Building CXX object CMakeFiles/graphqlparser.dir/Ast.cpp.o
[ 45%] Building CXX object CMakeFiles/graphqlparser.dir/c/GraphQLAst.cpp.o
[ 50%] Building CXX object CMakeFiles/graphqlparser.dir/c/GraphQLAstNode.cpp.o
[ 55%] Building CXX object CMakeFiles/graphqlparser.dir/c/GraphQLAstToJSON.cpp.o
[ 60%] Building CXX object CMakeFiles/graphqlparser.dir/c/GraphQLAstVisitor.cpp.o
[ 65%] Building CXX object CMakeFiles/graphqlparser.dir/c/GraphQLParser.cpp.o
[ 70%] Building CXX object CMakeFiles/graphqlparser.dir/parser.tab.cpp.o
In file included from parser.tab.cpp:46:
parser.ypp:62:58: warning: backslash and newline separated by space [-Wbackslash-newline-escape]
const char *heapStr; \
^
1 warning generated.
[ 75%] Building CXX object CMakeFiles/graphqlparser.dir/lexer.cpp.o
In file included from lexer.lpp:17:
parser.ypp:62:58: warning: backslash and newline separated by space [-Wbackslash-newline-escape]
const char *heapStr; \
^
lexer.cpp:788:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
lexer.cpp:789:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
lexer.cpp:789:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register char *yy_cp, *yy_bp;
^~~~~~~~~
lexer.cpp:790:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register int yy_act;
^~~~~~~~~
lexer.cpp:848:4: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
^~~~~~~~~
lexer.cpp:1313:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
^~~~~~~~~
lexer.cpp:1314:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register char *source = yyg->yytext_ptr;
^~~~~~~~~
lexer.cpp:1315:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register int number_to_move, i;
^~~~~~~~~
lexer.cpp:1315:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register int number_to_move, i;
^~~~~~~~~
lexer.cpp:1447:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
lexer.cpp:1448:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register char *yy_cp;
^~~~~~~~~
lexer.cpp:1455:3: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
^~~~~~~~~
lexer.cpp:1480:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register int yy_is_jam;
^~~~~~~~~
lexer.cpp:1482:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register char *yy_cp = yyg->yy_c_buf_p;
^~~~~~~~~
lexer.cpp:1484:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
register YY_CHAR yy_c = 1;
^~~~~~~~~
16 warnings generated.
[ 80%] Building CXX object CMakeFiles/graphqlparser.dir/GraphQLParser.cpp.o
In file included from /Users/bsr/Work/Programming/cpp/sample/libgraphqlparser/GraphQLParser.cpp:14:
parser.ypp:62:58: warning: backslash and newline separated by space [-Wbackslash-newline-escape]
const char *heapStr; \
^
1 warning generated.
Linking CXX shared library libgraphqlparser.dylib
[ 90%] Built target graphqlparser
Scanning dependencies of target dump_json_ast
[ 95%] Building CXX object CMakeFiles/dump_json_ast.dir/dump_json_ast.cpp.o
Linking CXX executable dump_json_ast
[ 95%] Built target dump_json_ast
Scanning dependencies of target graphql-parser-python
[100%] Generating GraphQLParser.py
[100%] Built target graphql-parser-python
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/include/graphqlparser/c
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAst.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstForEachConcreteType.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstNode.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstToJSON.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstVisitor.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLParser.h
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/hooks
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/info
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/logs
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/logs/refs
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/logs/refs/heads
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/logs/refs/remotes
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/logs/refs/remotes/origin
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/objects
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/objects/info
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/objects/pack
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/refs
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/refs/heads
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/refs/remotes
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/refs/remotes/origin
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/.git/refs/tags
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/ast
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/Ast.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/AstNode.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/AstVisitor.h
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/c
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/c/GraphQLAst.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/c/GraphQLAstForEachConcreteType.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/c/GraphQLAstNode.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/c/GraphQLAstToJSON.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/c/GraphQLAstVisitor.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/c/GraphQLParser.h
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/3.2.2
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/3.2.2/CompilerIdC
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/3.2.2/CompilerIdCXX
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/CMakeTmp
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/dump_json_ast.dir
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/graphqlparser.dir
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/CMakeFiles/graphqlparser.dir/c
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/go
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/GraphQLParser.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/JsonVisitor.h
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/lexer.h
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/python
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/python/CMakeFiles
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/python/CMakeFiles/graphql-parser-python.dir
-- Installing: /usr/local/include/graphqlparser/libgraphqlparser/syntaxdefs.h
-- Up-to-date: /usr/local/include/graphqlparser/libgraphqlparser/test
-- Up-to-date: /usr/local/include/graphqlparser/c
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAst.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstForEachConcreteType.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstNode.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstToJSON.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLAstVisitor.h
-- Installing: /usr/local/include/graphqlparser/c/GraphQLParser.h
-- Installing: /usr/local/include/graphqlparser/AstNode.h
-- Installing: /usr/local/include/graphqlparser/GraphQLParser.h
-- Installing: /usr/local/include/graphqlparser/JsonVisitor.h
-- Installing: /usr/local/include/graphqlparser/lexer.h
-- Installing: /usr/local/include/graphqlparser/location.hh
-- Installing: /usr/local/include/graphqlparser/parser.tab.hpp
-- Installing: /usr/local/include/graphqlparser/position.hh
-- Installing: /usr/local/include/graphqlparser/stack.hh
-- Installing: /usr/local/include/graphqlparser/syntaxdefs.h
-- Installing: /usr/local/lib/libgraphqlparser.dylib
~/W/P/c/s/libgraphqlparser ❯❯❯ cd go master ◼
README.md callbacks.go gotest.go
~/W/P/c/s/l/go ❯❯❯ cat README.md master ◼
This directory contains an example usage of the GraphQL parser and AST
library from Go. See [cgo's
documentation](https://github.com/golang/go/wiki/cgo), particularly
the "Function pointer callbacks" section, for explanation of the
mechanisms in use.
To build, first build the main GraphQLParser library in the parent
directory, and then set this directory to be your `GOPATH` and run `go
build`.
~/W/P/c/s/l/go ❯❯❯ export GOPATH-`pwd` master ◼
export: not valid in this context: GOPATH-/Users/bsr/Work/Programming/cpp/sample/libgraphqlparser/go
~/W/P/c/s/l/go ❯❯❯ export GOPATH=`pwd` ⏎ master ◼
~/W/P/c/s/l/go ❯❯❯ go build master ◼
# _/Users/bsr/Work/Programming/cpp/sample/libgraphqlparser/go
In file included from ./gotest.go:16:
../c/GraphQLAstVisitor.h:12:10: fatal error: 'c/GraphQLAst.h' file not found
#include "c/GraphQLAst.h"
^
1 error generated.
~/W/P/c/s/l/go ❯❯❯ atom ../c/GraphQLAstVisitor.h ⏎ master ◼
~/W/P/c/s/l/go ❯❯❯ go build master ◼
# _/Users/bsr/Work/Programming/cpp/sample/libgraphqlparser/go
./callbacks.go:14:10: warning: implicit declaration of function 'printField' is invalid in C99 [-Wimplicit-function-declaration]
~/W/P/c/s/l/go ❯❯❯ ls master ✱ ◼
README.md callbacks.go go gotest.go
~/W/P/c/s/l/go ❯❯❯ ./go master ✱ ◼
field : myfield
Example error: 1.18-19: syntax error, unexpected on, expecting ( or @ or {
~/W/P/c/s/l/go ❯❯❯ master ✱ ◼
Hi,
I am looking for a clean C++ example to retrieve the object hierarchy from graphql introspection JSON schema. Is that possible with this library?
Now a responsibility of validators instead of parser:
Spec: graphql/graphql-spec#95
Great package! Allows me to parse queries very quickly and easily!
Will schema parsing be added to this repo (written in c or cpp)? I can see graphql.js has a schema parser here: http://graphql.org/docs/api-reference-schema-language/
My motivation is to do something similar to https://github.com/matthewmueller/graph.ql but with another language.
Thank you,
Barret
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.