-
Notifications
You must be signed in to change notification settings - Fork 15
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
Autoregister Domain models into Graphql #295
Conversation
4334727
to
3c3893b
Compare
7f05dfe
to
9902c1a
Compare
@@ -65,7 +65,7 @@ dependencies = [ | |||
"nwa-stdlib~=1.4.8", | |||
"oauth2-lib~=1.3.1", | |||
"tabulate==0.9.0", | |||
"strawberry-graphql==0.171.1" | |||
"strawberry-graphql@git+https://github.com/tjeerddie/strawberry#egg=pydantic-convert-specialized-list-class" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using my forked version until it gets merged
003b672
to
e1c43f9
Compare
726d787
to
aa8a3b1
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #295 +/- ##
==========================================
- Coverage 76.68% 73.60% -3.09%
==========================================
Files 165 168 +3
Lines 8500 8637 +137
Branches 1370 1396 +26
==========================================
- Hits 6518 6357 -161
- Misses 1789 2097 +308
+ Partials 193 183 -10
... and 12 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
444dfd3
to
fd07a43
Compare
ff7b1f2
to
9674c31
Compare
- federated type doesn't work correctly with pydantic when you have defined resolvers within the strawberry type. so we need to first create a pydantic class and then we can create the federated class. - update unit tests.
- move `add_graphql` to a function inside OrchestratorCore class function `register_graphql` because using OrchestratorCore as import in add_graphql.py causes import loop. - rename models that get converted to strawberry type to remove `Initial` and `Inactive`. - add graphql tests as new github action steps because they fail when running with other tests.
- use OauthContext as base of OrchestratorContext. - fix incorrect docstring of `_has_subscription_details`.
- check if model is already added to strawberry_models. - rename `EnumList` to `EnumDict`. - update fail check in unit tests.
- found out you can add any graphql type propertie as 'Key' to a pydantic type as directives to make them usable in federations. - change product block naming to not remove 'Initial' and 'Inactive' because if you use a `RelatedProductBlock` instead of a `RelatedProductBlockInactive` you want to create a type for both of them. - add federation key directives to product blocks so they can also be federated.
0dab3ee
to
e4c2614
Compare
Closes: #261