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

Fix edge case when no config is provided #734

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

trevor-scheer
Copy link
Member

When no config is provided, the URI is resolved to the parent directory because we're not handling that case correctly.

To resolve this, the URI should be set to the filepath itself.

The manifestation of the issue can be seen in the screenshot below. In the current state, we're taking the .dir, which is undesirable when filePath points to the root of the project.

screen shot 2018-11-21 at 11 54 02 am

When no config is provided, the URI is resolved to the
_parent_ directory because we're not handling that case correctly.

To resolve this, the URI should be set to the filepath itself.
Copy link
Contributor

@martijnwalraven martijnwalraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the complete context and there might be a more principled way to deal with this, but I think this makes sense as a fix for now.

@trevor-scheer trevor-scheer merged commit 6d185c9 into master Nov 21, 2018
@trevor-scheer trevor-scheer deleted the trevor/fix-no-config-filepath branch November 21, 2018 23:03
@chrishandorf
Copy link

@trevor-scheer release 2.1.3 worked perfectly for me. 87 files generated across my 3 graphql folders. Bless you sir. Happy Holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants