graphql-idl-parser 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -1
- data/Rakefile +6 -4
- data/ext/graphql-idl-parser/graphql-idl-parser/Cargo.lock +295 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/Cargo.toml +16 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/LICENSE.txt +21 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/README.md +53 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/build.rs +5 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/Cargo.lock +305 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/Cargo.toml +18 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/README.md +48 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/example/example.c +33 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/includes/gql-idl-parser.h +138 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/src/lib.rs +128 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/src/types.rs +485 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-1d630313aa5d216c/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-1d630313aa5d216c/build_script_build-1d630313aa5d216c +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-3e27951e7158def5/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-3e27951e7158def5/build_script_build-3e27951e7158def5 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-481c4176d6a6472d/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-481c4176d6a6472d/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-5e9a4656cd081ee1/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/graphql-idl-parser-5e9a4656cd081ee1/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/kernel32-sys-2b7eb293aa6c1ae8/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/kernel32-sys-2b7eb293aa6c1ae8/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/kernel32-sys-da175f6bc66f228c/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/kernel32-sys-da175f6bc66f228c/build_script_build-da175f6bc66f228c +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/lalrpop-d0f0dc8a044bb86f/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/lalrpop-d0f0dc8a044bb86f/build_script_build-d0f0dc8a044bb86f +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/lalrpop-db9b482018d6c515/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/build/lalrpop-db9b482018d6c515/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libaho_corasick-07ac37ff1c5ebb39.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libascii_canvas-37ba58d788f6e28b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libatty-3d34ead0eff1f49c.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libbit_set-05034a00bed6372c.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libbit_vec-ba66b7b721a96204.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libbuild-d4f96a70b883038d.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libdiff-9cac472257fa481b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libdocopt-5b3087b1b6e5d091.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libeither-8157fecd348c1485.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libena-b40ce2cd268672c3.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libfixedbitset-c7f65ed08cebcf3b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libgraphql_idl_parser-38237266b2814db0.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libgraphql_idl_parser-85dc5bc4abe95968.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libgraphqlidlparser.dylib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libitertools-8d570d6c59d3b2d0.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libkernel32-fa4855bd85e0519b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/liblalrpop-8888f5942735b084.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/liblalrpop_intern-70b4cf4d149e3995.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/liblalrpop_snap-695e4827988eac78.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/liblalrpop_util-90bdd1a9fd691a70.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/liblazy_static-a6b1325db7ee41a1.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/liblibc-0d055c7503ac4180.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libmemchr-7e8d0bb06e3caae0.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libordermap-f92645c599568d9f.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libpetgraph-62c5b51f9db3f0c7.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libregex-5d259a9431f27ed9.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libregex_syntax-e6a16469e776d773.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/librustc_serialize-21d20a12dd90991b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libstrsim-8e26967d29bdf2e6.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libterm-189de8985c74cf03.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libthread_local-036458f1fbee14fb.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libunicode_xid-8adffabb9e6dd184.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libunreachable-bd47b36c4e87f432.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libutf8_ranges-220e9d44a3644657.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libvoid-d761da60d30362e9.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/deps/libwinapi-753252e15931e6fc.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/libgraphqlidlparser.d +1 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/target/release/libgraphqlidlparser.dylib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar.c +673 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar.h +161 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar/fixtures.h +54 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar/fs.h +341 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar/print.h +74 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar/sandbox.h +154 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/clar_test.h +19 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/enums.c +40 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/generate.py +243 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/helpers.c +60 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/helpers.h +6 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/input_objects.c +48 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/interfaces.c +41 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/main.c +35 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/objects.c +130 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/scalars.c +39 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/test/unions.c +38 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/script/compile +11 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/script/fmt +23 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/script/test +30 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/src/gqlidl.lalrpop +199 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/src/gqlidl.rs +29491 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/src/lib.rs +9 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/src/macros.rs +61 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/src/tests.rs +561 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/src/type_definition.rs +404 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-0ed64d9cad312f79/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-0ed64d9cad312f79/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-0fa24f7f5e35d20a/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-0fa24f7f5e35d20a/build_script_build-0fa24f7f5e35d20a +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-0fa24f7f5e35d20a/build_script_build-0fa24f7f5e35d20a.dSYM/Contents/Info.plist +20 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-0fa24f7f5e35d20a/build_script_build-0fa24f7f5e35d20a.dSYM/Contents/Resources/DWARF/build_script_build-0fa24f7f5e35d20a +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-57f7e3c3ef8471d2/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-57f7e3c3ef8471d2/build_script_build-57f7e3c3ef8471d2 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-57f7e3c3ef8471d2/build_script_build-57f7e3c3ef8471d2.dSYM/Contents/Info.plist +20 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-57f7e3c3ef8471d2/build_script_build-57f7e3c3ef8471d2.dSYM/Contents/Resources/DWARF/build_script_build-57f7e3c3ef8471d2 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-5e9a4656cd081ee1/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/graphql-idl-parser-5e9a4656cd081ee1/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/kernel32-sys-2b7eb293aa6c1ae8/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/kernel32-sys-2b7eb293aa6c1ae8/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/kernel32-sys-d2306aba19864163/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/kernel32-sys-d2306aba19864163/build_script_build-d2306aba19864163 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/kernel32-sys-d2306aba19864163/build_script_build-d2306aba19864163.dSYM/Contents/Info.plist +20 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/kernel32-sys-d2306aba19864163/build_script_build-d2306aba19864163.dSYM/Contents/Resources/DWARF/build_script_build-d2306aba19864163 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/lalrpop-4a05302baa5fb2a2/build-script-build +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/lalrpop-4a05302baa5fb2a2/build_script_build-4a05302baa5fb2a2 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/lalrpop-4a05302baa5fb2a2/build_script_build-4a05302baa5fb2a2.dSYM/Contents/Info.plist +20 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/lalrpop-4a05302baa5fb2a2/build_script_build-4a05302baa5fb2a2.dSYM/Contents/Resources/DWARF/build_script_build-4a05302baa5fb2a2 +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/lalrpop-db9b482018d6c515/output +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/build/lalrpop-db9b482018d6c515/stderr +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libaho_corasick-a9ec1f95080d1f6a.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libascii_canvas-92c3bf0cf98f6d67.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libatty-35b65e46cfc403bc.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libbit_set-d9484919f1726cf1.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libbit_vec-8716b059e7c4619b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libbuild-0b12b372edd4cd19.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libdiff-c81afd03f1d10610.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libdocopt-f02dfd6fea4878cc.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libeither-20b79fd67623dec7.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libena-e8706d9d37da725b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libfixedbitset-da616d0027237c90.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libgraphql_idl_parser-33a4c3bdcdc654b7.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libgraphql_idl_parser-d6636cf90a34aa47.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libitertools-34d50068529acf4d.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libkernel32-56b5a11a7716f7c7.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/liblalrpop-65f3c84608c05ce1.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/liblalrpop_intern-a3c97188386c0872.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/liblalrpop_snap-d6e467def27f0a55.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/liblalrpop_util-e59e6b2e2aec1b3e.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/liblazy_static-4518bdaa60b81936.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/liblibc-ab7be4fcfaa3a31b.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libmemchr-85dd561868acc188.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libordermap-4691b832eea88398.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libpetgraph-0220c5a13678d70e.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libregex-44e22d9874a5fb64.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libregex_syntax-490c2654111b5bf0.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/librustc_serialize-a7771718d4ee73a5.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libstrsim-038156debd12bd7a.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libterm-d12b955648e4f4b4.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libthread_local-84091b6b04cf1914.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libunicode_xid-89ce822c6e6dbe69.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libunreachable-654322b1fcb434b1.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libutf8_ranges-53f91d3b6e8885c9.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libvoid-181e881e54467554.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/deps/libwinapi-9c9d2aba65add76c.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/target/debug/libgraphql_idl_parser.rlib +0 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/enums.graphql +8 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/github.graphql +5115 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/input_objects.graphql +11 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/interfaces.graphql +5 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/objects.graphql +54 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/scalars.graphql +4 -0
- data/ext/graphql-idl-parser/graphql-idl-parser/test/unions.graphql +2 -0
- data/graphql-idl-parser.gemspec +8 -6
- data/lib/graphql-idl-parser/version.rb +1 -1
- data/test/graphql-idl-parser/enums_test.rb +20 -0
- data/test/graphql-idl-parser/graphql-idl-parser_test.rb +48 -0
- data/test/graphql-idl-parser/input_objects_test.rb +28 -0
- data/test/graphql-idl-parser/interfaces_test.rb +20 -0
- data/test/graphql-idl-parser/objects_test.rb +104 -0
- data/test/graphql-idl-parser/scalars_test.rb +19 -0
- data/test/graphql-idl-parser/unions_test.rb +18 -0
- data/test/test_helper.rb +12 -0
- metadata +194 -12
- data/.gitignore +0 -18
- data/.gitmodules +0 -4
- data/.rubocop.yml +0 -10
- data/.travis.yml +0 -28
- data/Gemfile +0 -4
- data/script/bootstrap +0 -11
- data/script/cibuild +0 -5
- data/script/update_submodules +0 -21
@@ -0,0 +1,305 @@
|
|
1
|
+
[root]
|
2
|
+
name = "graphql-idl-parser-ffi"
|
3
|
+
version = "0.1.3"
|
4
|
+
dependencies = [
|
5
|
+
"graphql-idl-parser 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
6
|
+
"libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
7
|
+
]
|
8
|
+
|
9
|
+
[[package]]
|
10
|
+
name = "aho-corasick"
|
11
|
+
version = "0.6.3"
|
12
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
13
|
+
dependencies = [
|
14
|
+
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
15
|
+
]
|
16
|
+
|
17
|
+
[[package]]
|
18
|
+
name = "ascii-canvas"
|
19
|
+
version = "1.0.0"
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
21
|
+
dependencies = [
|
22
|
+
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
23
|
+
]
|
24
|
+
|
25
|
+
[[package]]
|
26
|
+
name = "atty"
|
27
|
+
version = "0.1.2"
|
28
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
29
|
+
dependencies = [
|
30
|
+
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
31
|
+
"libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
32
|
+
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
33
|
+
]
|
34
|
+
|
35
|
+
[[package]]
|
36
|
+
name = "bit-set"
|
37
|
+
version = "0.4.0"
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
39
|
+
dependencies = [
|
40
|
+
"bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
41
|
+
]
|
42
|
+
|
43
|
+
[[package]]
|
44
|
+
name = "bit-vec"
|
45
|
+
version = "0.4.4"
|
46
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
47
|
+
|
48
|
+
[[package]]
|
49
|
+
name = "diff"
|
50
|
+
version = "0.1.10"
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
52
|
+
|
53
|
+
[[package]]
|
54
|
+
name = "docopt"
|
55
|
+
version = "0.7.0"
|
56
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
57
|
+
dependencies = [
|
58
|
+
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
59
|
+
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
60
|
+
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
61
|
+
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
62
|
+
]
|
63
|
+
|
64
|
+
[[package]]
|
65
|
+
name = "either"
|
66
|
+
version = "1.1.0"
|
67
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
68
|
+
|
69
|
+
[[package]]
|
70
|
+
name = "ena"
|
71
|
+
version = "0.5.0"
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
73
|
+
|
74
|
+
[[package]]
|
75
|
+
name = "fixedbitset"
|
76
|
+
version = "0.1.7"
|
77
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
78
|
+
|
79
|
+
[[package]]
|
80
|
+
name = "graphql-idl-parser"
|
81
|
+
version = "0.1.1"
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
83
|
+
dependencies = [
|
84
|
+
"lalrpop 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
85
|
+
"lalrpop-util 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
86
|
+
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
87
|
+
]
|
88
|
+
|
89
|
+
[[package]]
|
90
|
+
name = "itertools"
|
91
|
+
version = "0.5.10"
|
92
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
93
|
+
dependencies = [
|
94
|
+
"either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
95
|
+
]
|
96
|
+
|
97
|
+
[[package]]
|
98
|
+
name = "kernel32-sys"
|
99
|
+
version = "0.2.2"
|
100
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
101
|
+
dependencies = [
|
102
|
+
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
103
|
+
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
104
|
+
]
|
105
|
+
|
106
|
+
[[package]]
|
107
|
+
name = "lalrpop"
|
108
|
+
version = "0.13.1"
|
109
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
110
|
+
dependencies = [
|
111
|
+
"ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
112
|
+
"atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
113
|
+
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
114
|
+
"diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
115
|
+
"docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
116
|
+
"ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
117
|
+
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
118
|
+
"lalrpop-intern 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
119
|
+
"lalrpop-snap 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
120
|
+
"lalrpop-util 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
121
|
+
"petgraph 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
122
|
+
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
123
|
+
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
124
|
+
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
125
|
+
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
126
|
+
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
127
|
+
]
|
128
|
+
|
129
|
+
[[package]]
|
130
|
+
name = "lalrpop-intern"
|
131
|
+
version = "0.13.1"
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
133
|
+
|
134
|
+
[[package]]
|
135
|
+
name = "lalrpop-snap"
|
136
|
+
version = "0.13.1"
|
137
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
138
|
+
dependencies = [
|
139
|
+
"ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
140
|
+
"atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
141
|
+
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
142
|
+
"diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
143
|
+
"docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
144
|
+
"ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
145
|
+
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
146
|
+
"lalrpop-intern 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
147
|
+
"lalrpop-util 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
148
|
+
"petgraph 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
149
|
+
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
150
|
+
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
151
|
+
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
152
|
+
"term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
153
|
+
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
154
|
+
]
|
155
|
+
|
156
|
+
[[package]]
|
157
|
+
name = "lalrpop-util"
|
158
|
+
version = "0.13.1"
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
160
|
+
|
161
|
+
[[package]]
|
162
|
+
name = "lazy_static"
|
163
|
+
version = "0.2.8"
|
164
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
165
|
+
|
166
|
+
[[package]]
|
167
|
+
name = "libc"
|
168
|
+
version = "0.2.29"
|
169
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
170
|
+
|
171
|
+
[[package]]
|
172
|
+
name = "memchr"
|
173
|
+
version = "1.0.1"
|
174
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
175
|
+
dependencies = [
|
176
|
+
"libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
177
|
+
]
|
178
|
+
|
179
|
+
[[package]]
|
180
|
+
name = "ordermap"
|
181
|
+
version = "0.2.10"
|
182
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
183
|
+
|
184
|
+
[[package]]
|
185
|
+
name = "petgraph"
|
186
|
+
version = "0.4.5"
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
188
|
+
dependencies = [
|
189
|
+
"fixedbitset 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
190
|
+
"ordermap 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
191
|
+
]
|
192
|
+
|
193
|
+
[[package]]
|
194
|
+
name = "regex"
|
195
|
+
version = "0.2.2"
|
196
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
197
|
+
dependencies = [
|
198
|
+
"aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
199
|
+
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
200
|
+
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
201
|
+
"thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
202
|
+
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
203
|
+
]
|
204
|
+
|
205
|
+
[[package]]
|
206
|
+
name = "regex-syntax"
|
207
|
+
version = "0.4.1"
|
208
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
209
|
+
|
210
|
+
[[package]]
|
211
|
+
name = "rustc-serialize"
|
212
|
+
version = "0.3.24"
|
213
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
214
|
+
|
215
|
+
[[package]]
|
216
|
+
name = "strsim"
|
217
|
+
version = "0.6.0"
|
218
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
219
|
+
|
220
|
+
[[package]]
|
221
|
+
name = "term"
|
222
|
+
version = "0.4.6"
|
223
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
224
|
+
dependencies = [
|
225
|
+
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
226
|
+
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
227
|
+
]
|
228
|
+
|
229
|
+
[[package]]
|
230
|
+
name = "thread_local"
|
231
|
+
version = "0.3.4"
|
232
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
233
|
+
dependencies = [
|
234
|
+
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
235
|
+
"unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
236
|
+
]
|
237
|
+
|
238
|
+
[[package]]
|
239
|
+
name = "unicode-xid"
|
240
|
+
version = "0.0.4"
|
241
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
242
|
+
|
243
|
+
[[package]]
|
244
|
+
name = "unreachable"
|
245
|
+
version = "1.0.0"
|
246
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
247
|
+
dependencies = [
|
248
|
+
"void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
249
|
+
]
|
250
|
+
|
251
|
+
[[package]]
|
252
|
+
name = "utf8-ranges"
|
253
|
+
version = "1.0.0"
|
254
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
255
|
+
|
256
|
+
[[package]]
|
257
|
+
name = "void"
|
258
|
+
version = "1.0.2"
|
259
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
260
|
+
|
261
|
+
[[package]]
|
262
|
+
name = "winapi"
|
263
|
+
version = "0.2.8"
|
264
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
265
|
+
|
266
|
+
[[package]]
|
267
|
+
name = "winapi-build"
|
268
|
+
version = "0.1.1"
|
269
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
270
|
+
|
271
|
+
[metadata]
|
272
|
+
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
|
273
|
+
"checksum ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b385d69402821a1c254533a011a312531cbcc0e3e24f19bbb4747a5a2daf37e2"
|
274
|
+
"checksum atty 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0fd4c0631f06448cc45a6bbb3b710ebb7ff8ccb96a0800c994afe23a70d5df2"
|
275
|
+
"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c"
|
276
|
+
"checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f"
|
277
|
+
"checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472"
|
278
|
+
"checksum docopt 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab32ea6e284d87987066f21a9e809a73c14720571ef34516f0890b3d355ccfd8"
|
279
|
+
"checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a"
|
280
|
+
"checksum ena 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cabe5a5078ac8c506d3e4430763b1ba9b609b1286913e7d08e581d1c2de9b7e5"
|
281
|
+
"checksum fixedbitset 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b0cb3d75726fa0c5ed3dce5dfcf0796affa2a60b33967f45012d86fb95a886f2"
|
282
|
+
"checksum graphql-idl-parser 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0528577ff8e96262c877a218532d7c379adcb3020698c0335bad762a0a208289"
|
283
|
+
"checksum itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4833d6978da405305126af4ac88569b5d71ff758581ce5a987dbfa3755f694fc"
|
284
|
+
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
285
|
+
"checksum lalrpop 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8ebe5a5c90d5edeecb7f62f6ebec0a3d0f6faf4759a052708348cda99fd311a0"
|
286
|
+
"checksum lalrpop-intern 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05410c1e4aff497bdea1ccb274ac35536fda0ee858600df36966502d4f7acbe3"
|
287
|
+
"checksum lalrpop-snap 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f866ece35287f5223a1a022c5d86417c260cda2ca9c8a156af9959404ce5313"
|
288
|
+
"checksum lalrpop-util 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7c7743f235fc17f5f50f3b1e64a8690ee154f17f86bd68cbb78787c5b37907f7"
|
289
|
+
"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"
|
290
|
+
"checksum libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264"
|
291
|
+
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
|
292
|
+
"checksum ordermap 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c036a53e6bb62d7eee2edf7e087df56fd84c7bbae6a0bd93c2b9f54bddf62e03"
|
293
|
+
"checksum petgraph 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "14c6ae5ccb73b438781abc93d35615019b1ad6e24b44116377fb819cfd7587de"
|
294
|
+
"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
|
295
|
+
"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
|
296
|
+
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
|
297
|
+
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
|
298
|
+
"checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
|
299
|
+
"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14"
|
300
|
+
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
301
|
+
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
|
302
|
+
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
|
303
|
+
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
304
|
+
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
305
|
+
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
[package]
|
2
|
+
name = "graphql-idl-parser-ffi"
|
3
|
+
version = "0.1.3"
|
4
|
+
repository = "https://github.com/gjtorikian/graphql-idl-parser"
|
5
|
+
license = "MIT"
|
6
|
+
authors = ["Garen Torikian <gjtorikian@gmail.com>"]
|
7
|
+
description = "An FFI interface for the GraphQL IDL format parser."
|
8
|
+
|
9
|
+
[lib]
|
10
|
+
name = "graphqlidlparser"
|
11
|
+
crate_type = ["dylib"]
|
12
|
+
|
13
|
+
[dependencies]
|
14
|
+
graphql-idl-parser = "0.1.1"
|
15
|
+
libc = "^0.2"
|
16
|
+
|
17
|
+
[workspace]
|
18
|
+
exclude = ["example"]
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# C API for graphql-idl-parser
|
2
|
+
|
3
|
+
This is an FFI binding to the `graphql-idl-parser` crate, which allows you to use
|
4
|
+
that crate in your C project.
|
5
|
+
|
6
|
+
The header file (`includes/gql-idl-parser.h`) serves as the primary API documentation of
|
7
|
+
this library. T
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
There are examples on how to use this in C in the `example` and `test` sub-directories.
|
12
|
+
|
13
|
+
Simply running `cargo build --release` should generate the `.so` or `.dylib` for you.
|
14
|
+
|
15
|
+
Assuming you have a C compiler, then this should work to run the example:
|
16
|
+
|
17
|
+
``` console
|
18
|
+
$ git clone git://github.com/gjtorikian/graphql-idl-parser
|
19
|
+
$ ./compile
|
20
|
+
```
|
21
|
+
|
22
|
+
Here's a general usage example:
|
23
|
+
|
24
|
+
``` c
|
25
|
+
#include "gql-idl-parser.h"
|
26
|
+
|
27
|
+
int main()
|
28
|
+
{
|
29
|
+
GraphQLTypes* types = NULL;
|
30
|
+
size_t types_len = 0;
|
31
|
+
uint8_t err;
|
32
|
+
|
33
|
+
err = gqlidl_parse_schema("# Yeah yeah\nscalar DateTime\ntype OMG {}", &types, &types_len);
|
34
|
+
|
35
|
+
if (err > 0) {
|
36
|
+
printf("Error: Return code %d", err);
|
37
|
+
exit(err);
|
38
|
+
}
|
39
|
+
|
40
|
+
for (size_t i = 0; i < types_len; i++) {
|
41
|
+
// ...
|
42
|
+
}
|
43
|
+
}
|
44
|
+
```
|
45
|
+
|
46
|
+
## TODO:
|
47
|
+
|
48
|
+
- [ ] Run Valgrind
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#include <stdio.h>
|
2
|
+
#include <stdint.h>
|
3
|
+
#include <stdlib.h>
|
4
|
+
#include <string.h>
|
5
|
+
#include "gql-idl-parser.h"
|
6
|
+
|
7
|
+
int main()
|
8
|
+
{
|
9
|
+
GraphQLTypes* types = NULL;
|
10
|
+
size_t types_len = 0;
|
11
|
+
uint8_t err;
|
12
|
+
|
13
|
+
err = gqlidl_parse_schema("# Yeah yeah\nscalar DateTime\ntype OMG {}", &types, &types_len);
|
14
|
+
|
15
|
+
if (err > 0) {
|
16
|
+
printf("Error: Return code %d", err);
|
17
|
+
exit(err);
|
18
|
+
}
|
19
|
+
|
20
|
+
for (size_t i = 0; i < types_len; i++) {
|
21
|
+
printf("typename: %s\n", types[i].typename);
|
22
|
+
printf("desc: %s\n", types[i].scalar_type.description);
|
23
|
+
printf("name: %s\n", types[i].scalar_type.name);
|
24
|
+
if (strncmp(types[i].typename, "scalar", 6) == 0) {
|
25
|
+
printf("a scalar!");
|
26
|
+
}
|
27
|
+
if (strncmp(types[i].typename, "object", 6) == 0) {
|
28
|
+
printf("an object!");
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
return err;
|
33
|
+
}
|
data/ext/graphql-idl-parser/graphql-idl-parser/graphql-idl-parser-ffi/includes/gql-idl-parser.h
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
#ifndef _GQL_IDL_PARSER_H
|
2
|
+
#define _GQL_IDL_PARSER_H
|
3
|
+
|
4
|
+
#include <stdint.h>
|
5
|
+
#include <stdbool.h>
|
6
|
+
|
7
|
+
#ifdef __cplusplus
|
8
|
+
extern "C" {
|
9
|
+
#endif
|
10
|
+
|
11
|
+
typedef struct array_of_strings {
|
12
|
+
size_t length;
|
13
|
+
const char** data;
|
14
|
+
} array_and_size;
|
15
|
+
|
16
|
+
typedef struct FieldType {
|
17
|
+
const char* name;
|
18
|
+
const char* info;
|
19
|
+
} FieldType;
|
20
|
+
|
21
|
+
typedef struct GraphQLDirectiveArgument {
|
22
|
+
const char* name;
|
23
|
+
const char* value;
|
24
|
+
} GraphQLDirectiveArgument;
|
25
|
+
|
26
|
+
typedef struct array_of_directive_arguments {
|
27
|
+
size_t length;
|
28
|
+
const GraphQLDirectiveArgument* data;
|
29
|
+
} array_of_directive_arguments;
|
30
|
+
|
31
|
+
typedef struct GraphQLDirective {
|
32
|
+
const char* name;
|
33
|
+
struct array_of_directive_arguments arguments;
|
34
|
+
} GraphQLDirective;
|
35
|
+
|
36
|
+
typedef struct array_of_directives {
|
37
|
+
size_t length;
|
38
|
+
const GraphQLDirective* data;
|
39
|
+
} array_of_directives;
|
40
|
+
|
41
|
+
typedef struct GraphQLArgument {
|
42
|
+
const char* description;
|
43
|
+
const char* name;
|
44
|
+
FieldType type_info;
|
45
|
+
const char* default_value;
|
46
|
+
struct array_of_directives directives;
|
47
|
+
} GraphQLArgument;
|
48
|
+
|
49
|
+
typedef struct array_of_arguments {
|
50
|
+
size_t length;
|
51
|
+
const GraphQLArgument* data;
|
52
|
+
} array_of_arguments;
|
53
|
+
|
54
|
+
typedef struct GraphQLField {
|
55
|
+
const char* description;
|
56
|
+
const char* name;
|
57
|
+
FieldType type_info;
|
58
|
+
struct array_of_arguments arguments;
|
59
|
+
struct array_of_directives directives;
|
60
|
+
} GraphQLField;
|
61
|
+
|
62
|
+
typedef struct array_of_fields {
|
63
|
+
size_t length;
|
64
|
+
const GraphQLField* data;
|
65
|
+
} array_of_fields;
|
66
|
+
|
67
|
+
typedef struct GraphQLValue {
|
68
|
+
const char* description;
|
69
|
+
const char* name;
|
70
|
+
struct array_of_directives directives;
|
71
|
+
} GraphQLValue;
|
72
|
+
|
73
|
+
typedef struct array_of_values {
|
74
|
+
size_t length;
|
75
|
+
const GraphQLValue* data;
|
76
|
+
} array_of_values;
|
77
|
+
|
78
|
+
typedef struct GraphQLScalar {
|
79
|
+
const char* description;
|
80
|
+
const char* name;
|
81
|
+
} GraphQLScalar;
|
82
|
+
|
83
|
+
typedef struct GraphQLObject {
|
84
|
+
const char* description;
|
85
|
+
const char* name;
|
86
|
+
struct array_of_strings implements;
|
87
|
+
struct array_of_directives directives;
|
88
|
+
struct array_of_fields fields;
|
89
|
+
} GraphQLObject;
|
90
|
+
|
91
|
+
typedef struct GraphQLEnum {
|
92
|
+
const char* description;
|
93
|
+
const char* name;
|
94
|
+
struct array_of_directives directives;
|
95
|
+
struct array_of_values values;
|
96
|
+
} GraphQLEnum;
|
97
|
+
|
98
|
+
typedef struct GraphQLInterface {
|
99
|
+
const char* description;
|
100
|
+
const char* name;
|
101
|
+
struct array_of_directives directives;
|
102
|
+
struct array_of_fields fields;
|
103
|
+
} GraphQLInterface;
|
104
|
+
|
105
|
+
typedef struct GraphQLUnion {
|
106
|
+
const char* description;
|
107
|
+
const char* name;
|
108
|
+
struct array_of_directives directives;
|
109
|
+
struct array_of_strings values;
|
110
|
+
} GraphQLUnion;
|
111
|
+
|
112
|
+
typedef struct GraphQLInputObject {
|
113
|
+
const char* description;
|
114
|
+
const char* name;
|
115
|
+
struct array_of_directives directives;
|
116
|
+
struct array_of_fields fields;
|
117
|
+
} GraphQLInputObject;
|
118
|
+
|
119
|
+
typedef struct GraphQLTypes {
|
120
|
+
const char* typename;
|
121
|
+
union {
|
122
|
+
GraphQLScalar scalar_type;
|
123
|
+
GraphQLObject object_type;
|
124
|
+
GraphQLEnum enum_type;
|
125
|
+
GraphQLInterface interface_type;
|
126
|
+
GraphQLUnion union_type;
|
127
|
+
GraphQLInputObject input_object_type;
|
128
|
+
};
|
129
|
+
} GraphQLTypes;
|
130
|
+
|
131
|
+
/* This is the actual method exposed by Rust FFI */
|
132
|
+
uint8_t gqlidl_parse_schema(const char* schema, GraphQLTypes** types, size_t* types_len);
|
133
|
+
|
134
|
+
#ifdef __cplusplus
|
135
|
+
}
|
136
|
+
#endif
|
137
|
+
|
138
|
+
#endif
|