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

feat: add output file for export-schema #3033

Merged
merged 7 commits into from
Aug 15, 2023

Conversation

stillmatic
Copy link
Contributor

@stillmatic stillmatic commented Aug 13, 2023

Description

See #3032 for motivation

> strawberry export-schema backend.schema --output schema.gql
Schema exported to schema.gql
> strawberry export-schema backend.schema
# prints the result correctly

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).

@botberry
Copy link
Member

botberry commented Aug 13, 2023

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


Adds a new flag to export-schema command, --output, which allows the user to specify the output file. If unset (current behavior), the command will continue to print to stdout.


Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to @hingeloss for the PR 👏

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

@botberry
Copy link
Member

Hi, thanks for contributing to Strawberry 🍓!

We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!

So as soon as this PR is merged, a release will be made 🚀.

Here's an example of RELEASE.md:

Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :)

Here's the tweet text:

🆕 Release (next) is out! Thanks to @hingeloss for the PR 👏

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

@codecov
Copy link

codecov bot commented Aug 13, 2023

Codecov Report

Merging #3033 (f3ec9cd) into main (4fe8537) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3033      +/-   ##
==========================================
- Coverage   96.54%   96.54%   -0.01%     
==========================================
  Files         468      468              
  Lines       29184    29197      +13     
  Branches     3589     3591       +2     
==========================================
+ Hits        28177    28189      +12     
  Misses        827      827              
- Partials      180      181       +1     

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 13, 2023

CodSpeed Performance Report

Merging #3033 will not alter performance

⚠️ No base runs were found

Falling back to comparing stillmatic:main (f3ec9cd) with main (2ecaf8a)

Summary

✅ 12 untouched benchmarks

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.

Looks good so far, I've left just a couple of minor comments 😊

strawberry/cli/commands/export_schema.py Outdated Show resolved Hide resolved
strawberry/cli/commands/export_schema.py Outdated Show resolved Hide resolved
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.

Thank you so much!

I've merged main here, I'll merge the PR once the tests are green 😊

@patrick91 patrick91 merged commit 472d7fd into strawberry-graphql:main Aug 15, 2023
56 of 57 checks passed
@botberry
Copy link
Member

Thanks for contributing to Strawberry! 🎉 You've been invited to join
the Strawberry GraphQL organisation 😊

You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67

And don't forget to join our discord server: https://strawberry.rocks/discord 🔥

etripier pushed a commit to Greenbax/strawberry that referenced this pull request Oct 25, 2023
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Patrick Arminio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants