strawberry
strawberry copied to clipboard
Add SDL to strawberry command from awesome work of @srbiotik
Description
Given an SDL file, when one runs
strawberry import-schema <SDL_FILE_PATH> > schema.py
One gets autogenerated code equivalent to the sdl dumped into schema.py
file
Types of Changes
- [ ] Core
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement/optimization
- [ ] Documentation
Issues Fixed or Closed by This PR
#159
Checklist
- [ ] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] 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 Report
Merging #1868 (2b91996) into main (fae03c5) will decrease coverage by
0.18%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #1868 +/- ##
==========================================
- Coverage 98.17% 97.98% -0.19%
==========================================
Files 143 147 +4
Lines 5529 5653 +124
Branches 1016 1011 -5
==========================================
+ Hits 5428 5539 +111
- Misses 50 60 +10
- Partials 51 54 +3
Thanks for adding the RELEASE.md
file!
Here's a preview of the changelog:
Adds import-schema command to cli import-schema
The command transpiles SDL from a path to strawberry types which are printed to the stdout to be used at will.
Call it by: strawberry import-schema <PATH>
Here's the preview release card for twitter:
Here's the tweet text:
🆕 Release (next) is out! Thanks to Nahuel Ambrosini for the PR 👏
Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)