-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 settings API #2728
Add settings API #2728
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2728 +/- ##
==========================================
- Coverage 89.32% 89.24% -0.09%
==========================================
Files 206 207 +1
Lines 10362 10449 +87
Branches 1001 1010 +9
==========================================
+ Hits 9256 9325 +69
- Misses 795 805 +10
- Partials 311 319 +8
Continue to review full report at Codecov.
|
55c2789
to
8804492
Compare
saleor/graphql/site/mutations.py
Outdated
domain = graphene.String(description='Domain name for shop') | ||
header_text = graphene.String(description='Header text') | ||
description = graphene.String(description='SEO description') | ||
top_menu = graphene.ID( |
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.
Assigning storefront menus is covered in PR #2721 - I've added dedicated mutations for that.
saleor/graphql/site/mutations.py
Outdated
description='Display prices with tax in store') | ||
track_inventory_by_default = graphene.Boolean( | ||
description='Enable inventory tracking') | ||
homepage_collection = graphene.ID( |
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.
Maybe this should be done in a dedicated mutation?
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.
Maybe as a rule of thumb, we should only put here simple settings such as booleans or strings, while having dedicated mutations for operations that manipulate objects or relationships?
dd772a4
to
22b0265
Compare
75b41f2
to
40250b4
Compare
40250b4
to
3efd5e6
Compare
saleor/graphql/shop/mutations.py
Outdated
default_weight_unit = WeightUnitsEnum(description='Default weight unit') | ||
|
||
|
||
class ShopNavigationInput(graphene.InputObjectType): |
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.
This seems unused.
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.
Good catch!
saleor/graphql/shop/mutations.py
Outdated
|
||
class ShopDomainUpdate(BaseMutation): | ||
class Arguments: | ||
domain = graphene.String(description='Domain name for shop') |
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.
Shouldn't we also have an argument to update site.name
in this mutation?
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.
site name is not used anywhere I think
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.
It is used as the storefront's HTML title
.
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.
Right. I've added support for changing site name.
f5bd018
to
974df26
Compare
974df26
to
2e94a37
Compare
I want to merge this change because it resolves #2705
Pull Request Checklist