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

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

Closed
WillSquire opened this issue Jun 23, 2021 · 6 comments · Fixed by #8156
Closed

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

WillSquire opened this issue Jun 23, 2021 · 6 comments · Fixed by #8156
Assignees
Labels
dependencies stage/6-released The issue has been solved on a released version of the library

Comments

@WillSquire
Copy link

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",
@dotansimha
Copy link
Owner

@ardatan this might be something we can solve in graphql-tools?

@ardatan
Copy link
Collaborator

ardatan commented Jun 29, 2021

@dotansimha Not sure what causes it. I need to check.

@charlypoly charlypoly added stage/0-issue-prerequisites Needs more information before we can start working on it and removed bug/0-needs-repro labels Mar 14, 2022
@saihaj saihaj added this to the CLI Improvements milestone Jun 29, 2022
@saihaj
Copy link
Collaborator

saihaj commented Jul 27, 2022

this was issue in File loader and once this fix is released ardatan/graphql-tools#4603 will cut a new release

@saihaj
Copy link
Collaborator

saihaj commented Jul 27, 2022

graphql file loader new version should fix it 🤞🏼 https://github.com/ardatan/graphql-tools/releases/tag/%40graphql-tools%2Fgraphql-file-loader%407.5.0

@saihaj
Copy link
Collaborator

saihaj commented Jul 28, 2022

@saihaj saihaj added stage/6-released The issue has been solved on a released version of the library and removed help wanted Extra attention is needed stage/0-issue-prerequisites Needs more information before we can start working on it labels Jul 28, 2022
@charlypoly
Copy link
Contributor

Fixed in @graphql-codegen/cli@2.11.1 📦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies stage/6-released The issue has been solved on a released version of the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants