ppxConfig flags not being read from bsconfig but working if made inline

I wanna be able to just write this:

let make = %graphql(`
 query BlockQuery {
  main_blockheight {
    number
  }
 }
`)

But instead, I keep getting the error The value use can't be found in BlockHeightQuery.BlockQuery, unless I write this:

let make = %graphql(`
  query BlockQuery @ppxConfig(
    templateTagImport: "gql",
    templateTagLocation: "@apollo/client",
    templateTagIsFunction: true,
    templateTagReturnType: "ApolloClient.GraphQL_PPX.templateTagReturnType",
    extend: "ApolloClient.GraphQL_PPX.ExtendQuery"
  ){
    main_blockheight {
      number
    }
  }
`)

Not a problem, if I can specify the ppxConfig in bsconfig.json but it doesn’t work.

bsconfig.json

  "bs-dependencies": [
    "@rescript/react", 
    "@ryyppy/rescript-promise",
    "bs-fetch",
    "rescript-apollo-client",
    "@reasonml-community/graphql-ppx",
  ],
  "ppx-flags": ["@reasonml-community/graphql-ppx/ppx"],
  "graphql": {
    "apolloMode": true,
    "extendMutation": "ApolloClient.GraphQL_PPX.ExtendMutation",
    "extendQuery": "ApolloClient.GraphQL_PPX.ExtendQuery",
    "extend": "ApolloClient.GraphQL_PPX.ExtendQuery",
    "extendSubscription": "ApolloClient.GraphQL_PPX.ExtendSubscription",
    "templateTagReturnType": "ApolloClient.GraphQL_PPX.templateTagReturnType",
    "templateTagImport": "gql",
    "templateTagIsFunction": true,
    "templateTagLocation": "@apollo/client"
  },

Nevermind, apparently the problem was invalid bsconfig.json due to the trailing comma on the last element of the bs-dependencies array and graphql record. This is interesting though, the trailing comma doesn’t trigger an error for the rescript compiler, but it might be the case that graphql-ppx somehow is bothered by it.

Restarting my next.js dev server immediately showed the error of invalid json. There might be a potential bug here, dunno.