graphql_ppx icon indicating copy to clipboard operation
graphql_ppx copied to clipboard

Schema file not found

Open arnarthor opened this issue 5 years ago • 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?

arnarthor avatar Jan 04 '19 10:01 arnarthor

Hello!

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

mhallin avatar Jan 17 '19 20:01 mhallin

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

baldurh avatar Mar 14 '19 14:03 baldurh

I have this which isnt working either:

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

idkjs avatar Jun 28 '19 07:06 idkjs

@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.

nirvdrum avatar Sep 04 '19 05:09 nirvdrum