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

Add the app-dir to the python path when exporting the schema #1233

Merged

Conversation

Matt343
Copy link

@Matt343 Matt343 commented Sep 10, 2021

Description

The export-schema command was inconsistent with the debug server command, as it did not include the app-dir argument that modifies the PYTHONPATH. Without this argument, the command couldn't find local modules as the current working directory was not added to the path.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #1233 (67a80bd) into main (6cff2e4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1233   +/-   ##
=======================================
  Coverage   97.58%   97.59%           
=======================================
  Files          88       88           
  Lines        3360     3363    +3     
  Branches      489      489           
=======================================
+ Hits         3279     3282    +3     
  Misses         45       45           
  Partials       36       36           

@botberry
Copy link
Member

botberry commented Sep 10, 2021

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


Fixes a bug in the export-schema command around the handling of local modules.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Matt Allen for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

Copy link
Member

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

Nice one! Thank you!

@patrick91 patrick91 merged commit f0a086e into strawberry-graphql:main Sep 11, 2021
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.

The export-schema command fails when trying to import local modules
3 participants