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

Bug with import when using default export and there is a space before import and after # #3837

Open
dimaMachina opened this issue Nov 7, 2021 · 0 comments
Labels

Comments

@dimaMachina
Copy link
Collaborator

dimaMachina commented Nov 7, 2021

Describe the bug

When using default export import comment like this #import "./ProfileForm.graphql" works perfectly fine, but when we add a space before import and after # there is an error:

Error: 
    Import statement is not valid:
    >  import "./ProfileForm.graphql"
    If you want to have comments starting with '# import', please use ''' instead!
    You can only have 'import' statements in the following pattern;
    # import [Type].[Field] from [File]

To Reproduce
Steps to reproduce the behavior:

Related to graphql-hive/graphql-eslint#472 (comment)

  • Clone the repo and modify file src/UserProfileScreen.graphql change line #import "./ProfileForm.graphql" to # import "./ProfileForm.graphql"
  • Use @graphql-eslint/[email protected] that uses latest version of @graphql-tools/import package
  • yarn
  • yarn lint

Environment:

  • @graphql-tools/import: 6.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant