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

Cannot read properties of undefined (reading 'parserServices') #1981

Open
4 tasks
waynezhang1995 opened this issue Nov 6, 2023 · 2 comments
Open
4 tasks

Comments

@waynezhang1995
Copy link

waynezhang1995 commented Nov 6, 2023

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    For example, you can start off by editng the
    'basic' example on Stackblitz.

    Please make sure the graphql-eslint version under package.json matches yours.

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

We upgraded to "@graphql-eslint/eslint-plugin": "4.0.0-alpha.0", recently and this error started coming out.

We have the following setup in the eslintrc.js file

{
      files: '*.graphql',
      parser: "@graphql-eslint/eslint-plugin",
      parserOptions: {
        filePath: './graphql.config.js',
      },
    }

Based on the example, parserOptions seems unnecessary here and we do have a graphql.config.js file that colocates to the eslintrc file with the following content:

module.exports = {
  schema: ['./schema.graphql'],
  documents: ['./src/**/*.{ts,tsx}'],
};

Any ideas please?

To Reproduce Steps to reproduce the behavior:

Expected behavior

Environment:

  • OS: MacOS 14.1
  • @graphql-eslint/eslint-plugin:
  • Node.js: v18.14.2

Additional context

@dimaMachina
Copy link
Owner

where did you find that you need to specify parserOptions.filePath for your graphql-config?

@waynezhang1995
Copy link
Author

where did you find that you need to specify parserOptions.filePath for your graphql-config?

it was set up like that before, and it worked in the previous version. Going to try removing it and see if things start working

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

2 participants