strawberry icon indicating copy to clipboard operation
strawberry copied to clipboard

Add SDL to strawberry command from awesome work of @srbiotik

Open Ambro17 opened this issue 2 years ago • 2 comments

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

Ambro17 avatar May 02 '22 17:05 Ambro17

Codecov Report

Merging #1868 (2b91996) into main (fae03c5) will decrease coverage by 0.18%. The diff coverage is 100.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     

codecov[bot] avatar May 02 '22 17:05 codecov[bot]

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)

botberry avatar May 04 '22 04:05 botberry