o1-labs / graphql_ppx Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mhallin/graphql_ppx
GraphQL PPX rewriter for Bucklescript/ReasonML
License: BSD 3-Clause "New" or "Revised" License
This project forked from mhallin/graphql_ppx
GraphQL PPX rewriter for Bucklescript/ReasonML
License: BSD 3-Clause "New" or "Revised" License
Schema file access needs to be workspace-independent. Currently the logic is sensitive to whether the reference is from an external repo or not. For example, for tests_native
the schema file is //tests_native/graphql_schema.json
, and our build rules look like this:
GRAPHQL_SCHEMA_FILE = "graphql_schema.json"
GRAPHQL_SCHEMA_PATH = "tests_native/" + GRAPHQL_SCHEMA_FILE
# GRAPHQL_SCHEMA_PATH = "external/graphql_ppx/tests_native/" + GRAPHQL_SCHEMA_FILE
GRAPHQL_SCHEMA_JSON = "//tests_native:" + GRAPHQL_SCHEMA_FILE
...
ocaml_module(
name = "_Arg_named_query",
src = "arg_named_query.ml",
opts = GRAPHQL_PPX_TEST_MODULE_OPTS,
ppx = ":ppx1.exe",
ppx_args = [
"-schema", GRAPHQL_SCHEMA_PATH
],
ppx_data = [GRAPHQL_SCHEMA_JSON],
deps = GRAPHQL_PPX_TEST_DEPS + [
# do not sort (buildifier)
":_Test_shared",
],
)
To build this in "standalone mode" (i.e. from the graphql_ppx root dir) the first GRAPHQL_SCHEMA_PATH must be used. But if this repo is imported, as it is for Mina, then the second path must be used, which accounts for the way Bazel sets things up internally for external repos.
So the task is to figure out a way to refer to the schema files that is independent of such Bazel implementation details.
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.