Skip to content

Fix edge case when no config is provided#734

Merged
trevor-scheer merged 1 commit intomasterfrom
trevor/fix-no-config-filepath
Nov 21, 2018
Merged

Fix edge case when no config is provided#734
trevor-scheer merged 1 commit intomasterfrom
trevor/fix-no-config-filepath

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown

@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