Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorator auto accessors syntax is not supported #9974

Open
s-panferov opened this issue May 12, 2024 · 0 comments
Open

Decorator auto accessors syntax is not supported #9974

s-panferov opened this issue May 12, 2024 · 0 comments

Comments

@s-panferov
Copy link

Which packages are impacted by your issue?

@graphql-codegen/cli

Describe the bug

The codegen CLI does not seem to be compatible with the accessor syntax:

@observable.ref
accessor data: Workspace;

Output:

✔ Parse Configuration
⚠ Generate outputs
  ❯ Generate to ./gen/
    ✔ Load GraphQL schemas
    ✖ This experimental syntax requires enabling the parser plugin: "decoratorAutoAccessors". (42:11)
    ◼ Generate

Configuration:

import { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
  schema: "http://localhost:3000/graphql",
  // this assumes that all your source files are in a top-level `src/` directory - you might need to adjust this to your file structure
  documents: [
    "src/**/*.{ts,tsx}",
  ],
  generates: {
    "./gen/": {
      preset: "client",
      plugins: [],
      presetConfig: {
        gqlTagName: "gql",
      },
    },
  },
  // ignoreNoDocuments: true,
};

export default config;

Your Example Website or App

No

Steps to Reproduce the Bug or Issue

No

Expected behavior

Syntax supported

Screenshots or Videos

No response

Platform

"@graphql-codegen/cli": "^5.0.2",

Codegen Config File

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant