Skip to content

An import from GraphQL_PPX.bs.js appears in .bs.js #281

@vknez

Description

@vknez

Hi. I'm using graphql-ppx to talk to Shopify API and I found the following in my .bs.js file:

import * as GraphQL_PPX from "@reasonml-community/graphql-ppx/bucklescript/GraphQL_PPX.bs.js";

This means I would need to include graphql-ppx as a dependency instead of devDependency in my ReScript project. Is that normal?

I suspect this query is the culprit:

query SpecificCollections($ids: [ID!]!) @ppxConfig(schema: "schemas/shopify.json") {
  nodes(ids: $ids) {
    __typename
    ... on Collection {
      id
      ...CategoryCollectionFields
    }
  }
}

fragment ImageFields on Image @ppxConfig(schema: "schemas/shopify.json") {
  id
  url @ppxCustom(module: "ShopifyApi__Scalars__Url")
  altText
  width
  height
}

fragment MetafieldImageFields on Metafield @ppxConfig(schema: "schemas/shopify.json") {
  reference {
    __typename
    ... on MediaImage {
      image {
        ...ImageFields
      }
    }
  }
}

fragment CategoryCollectionFields on Collection @ppxConfig(schema: "schemas/shopify.json") {
  id
  title
  image: metafield(namespace: "ns", key: "ky") {
    ...MetafieldImageFields
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions