Skip to content

Commit c64659b

Browse files
committed
Update docs on how to pass schema for newer BuckleScript releases.
1 parent 5796b37 commit c64659b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,20 @@ npm run send-introspection-query http://my-api.example.com/api
8383

8484
If you've already got a schema file downloaded for other purposes, you can tell
8585
graphql_ppx to use that one by updating the "ppx-flags" in `bsconfig.json`.
86-
Note: no space around the equal sign!
86+
The syntax for passing arguments to a ppx is dependent on the version of
87+
BuckleScript you are using and consequently is only available in BuckleScript 5.1.0+.
88+
On older versions of BuckleScript there is no way to pass the ppx argument, so
89+
you will have to symlink your schema file to `graphql_schema.json` so graphql_ppx
90+
can read it.
91+
92+
Note: no space around the equal sign! Note also that the ppx and arguments are
93+
supplied as a nested array. If you supply them simply as strings, BuckleScript
94+
will treat each argument as its own ppx.
8795

8896
```json
8997
{
9098
"ppx-flags": [
91-
"graphql_ppx/ppx\\ -schema=your_schema.json"
99+
["graphql_ppx/ppx", "-schema=your_schema.json"]
92100
]
93101
}
94102
```

0 commit comments

Comments
 (0)