Giter Site home page Giter Site logo

o1-labs / graphql_ppx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mhallin/graphql_ppx

1.0 1.0 3.0 17.4 MB

GraphQL PPX rewriter for Bucklescript/ReasonML

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.43% Shell 1.96% JavaScript 2.23% OCaml 72.15% Starlark 11.30% Reason 11.92%

graphql_ppx's People

Contributors

anmonteiro avatar baransu avatar huxpro avatar jordwalke avatar mhallin avatar mobileink avatar mrmr1993 avatar neitsch avatar psteckler avatar sainthkh avatar schmavery avatar szymonzmyslony avatar ulrikstrid avatar wokalski avatar wyze avatar

Stargazers

 avatar

Watchers

 avatar  avatar

graphql_ppx's Issues

Bazel: make schema json file access workspace-independent

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.