mhallin/graphql_ppx

Schema file not found

Opened this issue · 4 comments

I'm trying to use the -schema parameter but I keep getting this error

Fatal error: exception Failure("graphql_ppx/ppx -schema=../shared/src/customerapi/graphql_schema.json not found when resolving ppx-flags")

No matter where I locate the schema file, it's always the same error. Having it as schema.json in the same folder as bsconfig also producec this error.

I've also tried it with graphql_ppx/ppx\\ -schema=... like mentioned for bs-platform 4.0.2 in #50.

Any ideas?

Hello!

The file should be named graphql_schema.json. I will look into as to why specifying the filename does not work.

@mhallin have you had the chance to look into this? 😬

idkjs commented

I have this which isnt working either:

  "ppx-flags": [
    "graphql_ppx/ppx\\ -schema=graphql_schema.json"
],

@idkjs I spent a while this evening trying to work this out. As of BuckleScript 5.1.0, the following works for me:

"ppx-flags": [
    ["graphql_ppx/ppx", "-verbose", "-schema=lib/js/src/graphql/schema.json"]
  ],

I'm new to the ecosystem, so I'm not really sure when it broke or was fixed. It appears this one has ping-ponged a few times. It looks like the array of arguments is the syntax going forward though.