Skip to content

& in path causes .graphql files not to be found #6174

@WillSquire

Description

@WillSquire

Describe the bug
If an & character is the a parent directory that codegen is running in it will produce the error Unable to find any GraphQL type definitions for the following pointers using schema file.

To Reproduce
Put the whole project in a folder containing & character. I.e. something & something directory.

My codegen.yml config file:

overwrite: true
schema: "../schema/schema.graphql"
documents: "src/**/*.graphql"
generates:
  src/middleware/graphql.tsx:
    plugins:
      - "typescript"
      - "typescript-operations"
      - "typescript-react-apollo"

Expected behavior
Escape the & character properly in whatever part of the script is causing the issue...

Environment:

  • OS: macOS
  • NodeJS: v14.15.0
"@graphql-codegen/add": "2.0.2",
"@graphql-codegen/cli": "1.21.5",
"@graphql-codegen/typescript": "1.22.3",
"@graphql-codegen/typescript-operations": "1.18.2",
"@graphql-codegen/typescript-react-apollo": "2.2.7",

Metadata

Metadata

Assignees

Labels

dependenciesstage/6-releasedThe issue has been solved on a released version of the library

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions