teamwalnut / graphql-ppx

GraphQL language primitives for ReScript/ReasonML written in ReasonML
https://graphql-ppx.com
MIT License
257 stars 53 forks source link

Allow passing an absolute path to the schema file #246

Closed anmonteiro closed 3 years ago

anmonteiro commented 3 years ago

Because of dune's project root resolution, sometimes the schema file isn't where the PPX expects.

anmonteiro commented 3 years ago

@jfrolich I think this is a pretty safe change, but I'm not aware how this interacts with caching. I feel like it just creates the cache folder in the same directory where the schema is.

anmonteiro commented 3 years ago

Just confirmed this is the case in: https://github.com/reasonml-community/graphql-ppx/blob/aac98883172d97b8112364f45d9a00af284e67d1/src/base/read_schema.re#L337

Merging this, then.