Skip to content

loadDocument and loadDocumentSync loading excluded files #1748

@mattietea

Description

@mattietea

Issue workflow progress

Describe the bug

It seems loadDocument and loadDocumentSync reference don't account for the project's exclude property resulting in unnecessary files getting loaded into memory.

To Reproduce
Steps to reproduce the behavior:

Created a github example here with a patch for a potential fix

Expected behavior

I would expect exclude to prevent those files from being loaded into memory

Environment:

  • OS: MacOS 26.0.1
  • GraphQL Config Version: 5.1.5
  • NodeJS: v24.9.0

Additional context

We're going through a restructure of the codebase and noticed that the ESLint plugin was running out of memory in certain scenarios. I think it's coming from here.

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