Giter VIP home page Giter VIP logo

Comments (4)

paulomarg avatar paulomarg commented on May 29, 2024

Thank you for raising this. To make it easier for me to try and reproduce the scenario, could you please also include your .graphqlrc.ts file?

from shopify-api-js.

apalumbo avatar apalumbo commented on May 29, 2024

@paulomarg same error here, this is mine

import { ApiType, pluckConfig, preset } from "@shopify/api-codegen-preset";

export default {
  // For syntax highlighting / auto-complete when writing operations
  schema: "https://shopify.dev/admin-graphql-direct-proxy",
  documents: ["./**/*.{js,ts,jsx,tsx}"],
  projects: {
    default: {
      // For type extraction
      schema: "https://shopify.dev/admin-graphql-direct-proxy",
      documents: ["./**/*.{js,ts,jsx,tsx}"],
      extensions: {
        codegen: {
          // Enables support for `#graphql` tags, as well as `/* GraphQL */`
          pluckConfig,
          generates: {
            "./src/types/admin.schema.json": {
              plugins: ["introspection"],
              config: { minify: true },
            },
            "./src/types/admin.types.d.ts": {
              plugins: ["typescript"],
            },
            "./src/types/admin.generated.d.ts": {
              preset,
              presetConfig: {
                apiType: ApiType.Admin,
              },
            },
          },
        },
      },
    },
  },
};```

from shopify-api-js.

paulomarg avatar paulomarg commented on May 29, 2024

@apalumbo thanks! I think you might be running into issues because of your documents value, it seems to be looking at every document in the app, which would also include node_modules and probably fail if any packages use a GraphQL tag.

I think you have 2 alternatives here:

  1. Add a glob pattern to ignore node_modules. I think this would look something like !**/node_modules (untested).
  2. Make your documents value more specific, like ./app/**/*.{ts,tsx,js,jsx}

from shopify-api-js.

github-actions avatar github-actions commented on May 29, 2024

We are closing this issue because we did not hear back regarding additional details we needed to resolve this issue. If the issue persists and you are able to provide the missing clarification we need, feel free to respond and reopen this issue.

We appreciate your understanding as we try to manage our number of open issues.

from shopify-api-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.