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

index.graphql and any schema files named index #135

Closed
sonyseng opened this issue Apr 17, 2018 · 3 comments
Closed

index.graphql and any schema files named index #135

sonyseng opened this issue Apr 17, 2018 · 3 comments
Labels
🐞bug Something isn't working 📦released This issue or pull request is released

Comments

@sonyseng
Copy link

I just started using this library and this stumped me for a short while. Just wanted to point out that the code filtering out index.js and index.ts is a bit more general than what the README states and will filter out any file named index. It just so happened that my graphql schema files were named index.graphql.

file_loader.js

  const files = schemafiles
        .map(f => ({ f, pathObj: path.parse(f) }))
        .filter(({ pathObj }) => pathObj.name.toLowerCase() !== 'index')
        .filter(({ pathObj }) => extensions.includes(pathObj.ext))
@cfnelson
Copy link
Contributor

@sonyseng Would be happy to accept a PR if you would like to contribute. 🙌 You could update the documentation to make this behaviour more clear to anyone using the pkg.
We potentially could also accept a PR if given some thought as well to change the behaviour you described above.

@kamilkisiela
Copy link
Collaborator

@kamilkisiela kamilkisiela added 🐞bug Something isn't working ⏳waiting for release This issue or pull request is waiting to be released and removed 🎓good for beginners labels Jul 30, 2019
@kamilkisiela
Copy link
Collaborator

Fixed with v1.7.0

@kamilkisiela kamilkisiela added 📦released This issue or pull request is released and removed ⏳waiting for release This issue or pull request is waiting to be released labels Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug Something isn't working 📦released This issue or pull request is released
Projects
None yet
Development

No branches or pull requests

3 participants