graphql-idl-parser 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,404 @@
|
|
|
1
|
+
static SCALAR: &'static str = "scalar";
|
|
2
|
+
static OBJECT: &'static str = "object";
|
|
3
|
+
static ENUM: &'static str = "enum";
|
|
4
|
+
static INTERFACE: &'static str = "interface";
|
|
5
|
+
static UNION: &'static str = "union";
|
|
6
|
+
static INPUT_OBJECT: &'static str = "input_object";
|
|
7
|
+
|
|
8
|
+
pub struct GraphQLScalar {
|
|
9
|
+
description: Option<String>,
|
|
10
|
+
name: String,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
pub struct GraphQLObject {
|
|
14
|
+
description: Option<String>,
|
|
15
|
+
name: String,
|
|
16
|
+
implements: Option<Vec<String>>,
|
|
17
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
18
|
+
fields: Option<Vec<GraphQLField>>,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
pub struct GraphQLEnum {
|
|
22
|
+
description: Option<String>,
|
|
23
|
+
name: String,
|
|
24
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
25
|
+
values: Vec<GraphQLValue>,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
pub struct GraphQLInterface {
|
|
29
|
+
description: Option<String>,
|
|
30
|
+
name: String,
|
|
31
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
32
|
+
fields: Option<Vec<GraphQLField>>,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
pub struct GraphQLUnion {
|
|
36
|
+
description: Option<String>,
|
|
37
|
+
name: String,
|
|
38
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
39
|
+
types: Vec<String>,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
pub struct GraphQLInputObject {
|
|
43
|
+
description: Option<String>,
|
|
44
|
+
name: String,
|
|
45
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
46
|
+
fields: Option<Vec<GraphQLField>>,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
pub enum TypeDefinition {
|
|
50
|
+
ScalarType(GraphQLScalar),
|
|
51
|
+
ObjectType(GraphQLObject),
|
|
52
|
+
EnumType(GraphQLEnum),
|
|
53
|
+
InterfaceType(GraphQLInterface),
|
|
54
|
+
UnionType(GraphQLUnion),
|
|
55
|
+
InputObjectType(GraphQLInputObject),
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#[derive(Clone)]
|
|
59
|
+
pub struct GraphQLField {
|
|
60
|
+
description: Option<String>,
|
|
61
|
+
name: String,
|
|
62
|
+
typeinfo: FieldType,
|
|
63
|
+
arguments: Option<Vec<GraphQLArgument>>,
|
|
64
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#[derive(Clone)]
|
|
68
|
+
pub struct GraphQLValue {
|
|
69
|
+
description: Option<String>,
|
|
70
|
+
name: String,
|
|
71
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#[derive(Clone, Debug, PartialEq)]
|
|
75
|
+
pub struct GraphQLArgument {
|
|
76
|
+
description: Option<String>,
|
|
77
|
+
name: String,
|
|
78
|
+
typeinfo: FieldType,
|
|
79
|
+
default: Option<String>,
|
|
80
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#[derive(Clone, Debug, PartialEq)]
|
|
84
|
+
pub struct GraphQLDirective {
|
|
85
|
+
name: String,
|
|
86
|
+
arguments: Option<Vec<GraphQLDirectiveArgument>>,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
#[derive(Clone, Debug, PartialEq)]
|
|
90
|
+
pub struct GraphQLDirectiveArgument {
|
|
91
|
+
name: String,
|
|
92
|
+
value: Option<String>,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#[derive(Clone, Debug, PartialEq)]
|
|
96
|
+
pub struct FieldType {
|
|
97
|
+
pub name: String,
|
|
98
|
+
pub info: TypeInfo,
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
impl GraphQLScalar {
|
|
102
|
+
pub fn new(description: Option<String>, name: String) -> GraphQLScalar {
|
|
103
|
+
GraphQLScalar {
|
|
104
|
+
description: description,
|
|
105
|
+
name: name,
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
impl GraphQLObject {
|
|
111
|
+
pub fn new(
|
|
112
|
+
description: Option<String>,
|
|
113
|
+
name: String,
|
|
114
|
+
implements: Option<Vec<String>>,
|
|
115
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
116
|
+
fields: Option<Vec<GraphQLField>>,
|
|
117
|
+
) -> GraphQLObject {
|
|
118
|
+
GraphQLObject {
|
|
119
|
+
description: description,
|
|
120
|
+
name: name,
|
|
121
|
+
implements: implements,
|
|
122
|
+
directives: directives,
|
|
123
|
+
fields: fields,
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
impl GraphQLEnum {
|
|
129
|
+
pub fn new(
|
|
130
|
+
description: Option<String>,
|
|
131
|
+
name: String,
|
|
132
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
133
|
+
values: Vec<GraphQLValue>,
|
|
134
|
+
) -> GraphQLEnum {
|
|
135
|
+
GraphQLEnum {
|
|
136
|
+
description: description,
|
|
137
|
+
name: name,
|
|
138
|
+
directives: directives,
|
|
139
|
+
values: values,
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
impl GraphQLInterface {
|
|
145
|
+
pub fn new(
|
|
146
|
+
description: Option<String>,
|
|
147
|
+
name: String,
|
|
148
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
149
|
+
fields: Option<Vec<GraphQLField>>,
|
|
150
|
+
) -> GraphQLInterface {
|
|
151
|
+
GraphQLInterface {
|
|
152
|
+
description: description,
|
|
153
|
+
name: name,
|
|
154
|
+
directives: directives,
|
|
155
|
+
fields: fields,
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
impl GraphQLUnion {
|
|
161
|
+
pub fn new(
|
|
162
|
+
description: Option<String>,
|
|
163
|
+
name: String,
|
|
164
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
165
|
+
types: Vec<String>,
|
|
166
|
+
) -> GraphQLUnion {
|
|
167
|
+
GraphQLUnion {
|
|
168
|
+
description: description,
|
|
169
|
+
name: name,
|
|
170
|
+
directives: directives,
|
|
171
|
+
types: types,
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
impl GraphQLInputObject {
|
|
177
|
+
pub fn new(
|
|
178
|
+
description: Option<String>,
|
|
179
|
+
name: String,
|
|
180
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
181
|
+
fields: Option<Vec<GraphQLField>>,
|
|
182
|
+
) -> GraphQLInputObject {
|
|
183
|
+
GraphQLInputObject {
|
|
184
|
+
description: description,
|
|
185
|
+
name: name,
|
|
186
|
+
directives: directives,
|
|
187
|
+
fields: fields,
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
#[derive(Clone, Debug, PartialEq)]
|
|
193
|
+
pub enum TypeInfo {
|
|
194
|
+
Nullable,
|
|
195
|
+
NonNullable,
|
|
196
|
+
NullableListNullableElements,
|
|
197
|
+
NullableListNullableNonNullableElements,
|
|
198
|
+
NonNullableListNullableElements,
|
|
199
|
+
NonNullableListNonNullableElements,
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
impl TypeInfo {
|
|
203
|
+
pub fn as_str(&self) -> &str {
|
|
204
|
+
match self {
|
|
205
|
+
&TypeInfo::Nullable => "",
|
|
206
|
+
&TypeInfo::NonNullable => "!",
|
|
207
|
+
&TypeInfo::NullableListNullableElements => "[]",
|
|
208
|
+
&TypeInfo::NullableListNullableNonNullableElements => "[!]",
|
|
209
|
+
&TypeInfo::NonNullableListNullableElements => "[]!",
|
|
210
|
+
&TypeInfo::NonNullableListNonNullableElements => "[!]!",
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
impl TypeDefinition {
|
|
216
|
+
pub fn typename(&self) -> &str {
|
|
217
|
+
match *self {
|
|
218
|
+
TypeDefinition::ScalarType { .. } => SCALAR,
|
|
219
|
+
TypeDefinition::ObjectType { .. } => OBJECT,
|
|
220
|
+
TypeDefinition::EnumType { .. } => ENUM,
|
|
221
|
+
TypeDefinition::InterfaceType { .. } => INTERFACE,
|
|
222
|
+
TypeDefinition::UnionType { .. } => UNION,
|
|
223
|
+
TypeDefinition::InputObjectType { .. } => INPUT_OBJECT,
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
impl_graphql_objects_common_methods! {
|
|
228
|
+
ScalarType:GraphQLScalar,
|
|
229
|
+
ObjectType:GraphQLObject,
|
|
230
|
+
EnumType:GraphQLEnum,
|
|
231
|
+
InterfaceType:GraphQLInterface,
|
|
232
|
+
UnionType:GraphQLUnion,
|
|
233
|
+
InputObjectType:GraphQLInputObject
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
pub fn implements(&self) -> Option<Vec<String>> {
|
|
237
|
+
match *self {
|
|
238
|
+
TypeDefinition::ObjectType(GraphQLObject { ref implements, .. }) => implements.clone(),
|
|
239
|
+
_ => panic!("That method does not exist for this type."),
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
pub fn directives(&self) -> Option<Vec<GraphQLDirective>> {
|
|
244
|
+
match *self {
|
|
245
|
+
TypeDefinition::ObjectType(GraphQLObject { ref directives, .. }) => directives.clone(),
|
|
246
|
+
TypeDefinition::EnumType(GraphQLEnum { ref directives, .. }) => directives.clone(),
|
|
247
|
+
TypeDefinition::InterfaceType(GraphQLInterface { ref directives, .. }) => {
|
|
248
|
+
directives.clone()
|
|
249
|
+
}
|
|
250
|
+
TypeDefinition::UnionType(GraphQLUnion { ref directives, .. }) => directives.clone(),
|
|
251
|
+
TypeDefinition::InputObjectType(GraphQLInputObject { ref directives, .. }) => {
|
|
252
|
+
directives.clone()
|
|
253
|
+
}
|
|
254
|
+
_ => panic!("That method does not exist for this type."),
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
pub fn fields(&self) -> Option<Vec<GraphQLField>> {
|
|
259
|
+
match *self {
|
|
260
|
+
TypeDefinition::ObjectType(GraphQLObject { ref fields, .. }) |
|
|
261
|
+
TypeDefinition::InterfaceType(GraphQLInterface { ref fields, .. }) |
|
|
262
|
+
TypeDefinition::InputObjectType(GraphQLInputObject { ref fields, .. }) => {
|
|
263
|
+
fields.to_owned()
|
|
264
|
+
}
|
|
265
|
+
_ => panic!("That method does not exist for this type."),
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
pub fn values(&self) -> Option<Vec<GraphQLValue>> {
|
|
270
|
+
match *self {
|
|
271
|
+
TypeDefinition::EnumType(GraphQLEnum { ref values, .. }) => {
|
|
272
|
+
if values.len() > 0 {
|
|
273
|
+
return Some(values.to_vec());
|
|
274
|
+
}
|
|
275
|
+
None
|
|
276
|
+
}
|
|
277
|
+
_ => panic!("That method does not exist for this type."),
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
pub fn types(&self) -> Option<Vec<String>> {
|
|
282
|
+
match *self {
|
|
283
|
+
TypeDefinition::UnionType(GraphQLUnion { ref types, .. }) => {
|
|
284
|
+
if types.len() > 0 {
|
|
285
|
+
return Some(types.to_vec());
|
|
286
|
+
}
|
|
287
|
+
None
|
|
288
|
+
}
|
|
289
|
+
_ => panic!("That method does not exist for this type."),
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
impl_graphql_meta_methods! { GraphQLField, GraphQLArgument, GraphQLValue }
|
|
295
|
+
impl_graphql_directive_methods! { GraphQLField, GraphQLArgument, GraphQLValue }
|
|
296
|
+
impl_graphql_type_methods! { GraphQLField, GraphQLArgument }
|
|
297
|
+
|
|
298
|
+
impl GraphQLField {
|
|
299
|
+
pub fn new(
|
|
300
|
+
description: Option<String>,
|
|
301
|
+
name: String,
|
|
302
|
+
typeinfo: FieldType,
|
|
303
|
+
arguments: Option<Vec<GraphQLArgument>>,
|
|
304
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
305
|
+
) -> GraphQLField {
|
|
306
|
+
GraphQLField {
|
|
307
|
+
description: description,
|
|
308
|
+
name: name,
|
|
309
|
+
typeinfo: typeinfo,
|
|
310
|
+
arguments: arguments,
|
|
311
|
+
directives: directives,
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
pub fn arguments(&self) -> Option<Vec<GraphQLArgument>> {
|
|
316
|
+
match self.arguments {
|
|
317
|
+
None => None,
|
|
318
|
+
Some(ref arguments) => Some(arguments.clone()),
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
impl GraphQLArgument {
|
|
324
|
+
pub fn new(
|
|
325
|
+
description: Option<String>,
|
|
326
|
+
name: String,
|
|
327
|
+
typeinfo: FieldType,
|
|
328
|
+
default: Option<String>,
|
|
329
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
330
|
+
) -> GraphQLArgument {
|
|
331
|
+
GraphQLArgument {
|
|
332
|
+
description: description,
|
|
333
|
+
name: name,
|
|
334
|
+
typeinfo: typeinfo,
|
|
335
|
+
default: default,
|
|
336
|
+
directives: directives,
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
pub fn default(&self) -> Option<&str> {
|
|
341
|
+
self.default.as_ref().map(|s| s.as_ref())
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
impl GraphQLValue {
|
|
346
|
+
pub fn new(
|
|
347
|
+
description: Option<String>,
|
|
348
|
+
name: String,
|
|
349
|
+
directives: Option<Vec<GraphQLDirective>>,
|
|
350
|
+
) -> GraphQLValue {
|
|
351
|
+
GraphQLValue {
|
|
352
|
+
description: description,
|
|
353
|
+
name: name,
|
|
354
|
+
directives: directives,
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
impl GraphQLDirective {
|
|
360
|
+
pub fn new(name: String, arguments: Option<Vec<GraphQLDirectiveArgument>>) -> GraphQLDirective {
|
|
361
|
+
GraphQLDirective {
|
|
362
|
+
name: name,
|
|
363
|
+
arguments: arguments,
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
pub fn name(&self) -> &str {
|
|
368
|
+
&self.name
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
pub fn arguments(&self) -> Option<Vec<GraphQLDirectiveArgument>> {
|
|
372
|
+
match self.arguments {
|
|
373
|
+
None => None,
|
|
374
|
+
Some(ref arguments) => Some(arguments.clone()),
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
impl GraphQLDirectiveArgument {
|
|
380
|
+
pub fn new(name: String, value: Option<String>) -> GraphQLDirectiveArgument {
|
|
381
|
+
GraphQLDirectiveArgument {
|
|
382
|
+
name: name,
|
|
383
|
+
value: value,
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
pub fn name(&self) -> &str {
|
|
388
|
+
&self.name
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
pub fn value(&self) -> Option<&str> {
|
|
392
|
+
self.value.as_ref().map(|s| s.as_ref())
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
impl FieldType {
|
|
397
|
+
pub fn name(&self) -> &str {
|
|
398
|
+
&self.name
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
pub fn info(&self) -> &str {
|
|
402
|
+
&self.info.as_str()
|
|
403
|
+
}
|
|
404
|
+
}
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>English</string>
|
|
7
|
+
<key>CFBundleIdentifier</key>
|
|
8
|
+
<string>com.apple.xcode.dsym.build_script_build-0fa24f7f5e35d20a</string>
|
|
9
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
10
|
+
<string>6.0</string>
|
|
11
|
+
<key>CFBundlePackageType</key>
|
|
12
|
+
<string>dSYM</string>
|
|
13
|
+
<key>CFBundleSignature</key>
|
|
14
|
+
<string>????</string>
|
|
15
|
+
<key>CFBundleShortVersionString</key>
|
|
16
|
+
<string>1.0</string>
|
|
17
|
+
<key>CFBundleVersion</key>
|
|
18
|
+
<string>1</string>
|
|
19
|
+
</dict>
|
|
20
|
+
</plist>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>English</string>
|
|
7
|
+
<key>CFBundleIdentifier</key>
|
|
8
|
+
<string>com.apple.xcode.dsym.build_script_build-57f7e3c3ef8471d2</string>
|
|
9
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
10
|
+
<string>6.0</string>
|
|
11
|
+
<key>CFBundlePackageType</key>
|
|
12
|
+
<string>dSYM</string>
|
|
13
|
+
<key>CFBundleSignature</key>
|
|
14
|
+
<string>????</string>
|
|
15
|
+
<key>CFBundleShortVersionString</key>
|
|
16
|
+
<string>1.0</string>
|
|
17
|
+
<key>CFBundleVersion</key>
|
|
18
|
+
<string>1</string>
|
|
19
|
+
</dict>
|
|
20
|
+
</plist>
|