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

Extract enums #3523

Merged
merged 11 commits into from
Jan 2, 2019
Merged

Extract enums #3523

merged 11 commits into from
Jan 2, 2019

Conversation

maarcingebala
Copy link
Member

@maarcingebala maarcingebala commented Dec 28, 2018

GraphQL maintenance - this PR extracts all enums to separate enums.py files within each graphql module. Also, I've moved some scalars to their own files.

Pull Request Checklist

  1. Privileged views and APIs are guarded by proper permission checks.
  2. All visible strings are translated with proper context.
  3. All data-formatting is locale-aware (dates, numbers, and so on).
  4. Database queries are optimized and the number of queries is constant.
  5. Database migration files are up to date.
  6. The changes are tested.
  7. The code is documented (docstrings, project documentation).
  8. GraphQL schema and type definitions are up to date.
  9. Changes are mentioned in the changelog.

@maarcingebala maarcingebala added the graphql Issues related to the GraphQL API label Dec 28, 2018
@@ -2,27 +2,31 @@
from graphql_jwt.decorators import permission_required

from ..core.fields import PrefetchingConnectionField
from ..descriptions import DESCRIPTIONS
# FIXME: Types are imported before mutations on purpose. Otherwise these types
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we imported these at the beginning of mutations.py?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that as well. Actually, I think there is no much difference - either here or there isort will complain about the wrong order of imports. I have no idea why this happens, I spent one hour trying to debug it but found nothing.

@codecov
Copy link

codecov bot commented Dec 28, 2018

Codecov Report

Merging #3523 into master will decrease coverage by 0.02%.
The diff coverage is 87.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3523      +/-   ##
==========================================
- Coverage   89.88%   89.86%   -0.03%     
==========================================
  Files         241      250       +9     
  Lines       13120    13157      +37     
  Branches     1324     1326       +2     
==========================================
+ Hits        11793    11823      +30     
- Misses        922      927       +5     
- Partials      405      407       +2
Impacted Files Coverage Δ
saleor/graphql/core/types/money.py 100% <ø> (ø) ⬆️
saleor/graphql/core/types/__init__.py 100% <ø> (ø) ⬆️
saleor/graphql/discount/schema.py 92.85% <100%> (-0.25%) ⬇️
saleor/graphql/order/types.py 85.63% <100%> (-0.33%) ⬇️
saleor/graphql/product/mutations/attributes.py 93.17% <100%> (+0.03%) ⬆️
saleor/graphql/shipping/mutations.py 97.11% <100%> (+0.02%) ⬆️
saleor/graphql/checkout/types.py 86.53% <100%> (ø) ⬆️
saleor/graphql/order/schema.py 100% <100%> (ø) ⬆️
saleor/graphql/product/types.py 97.1% <100%> (+0.08%) ⬆️
saleor/graphql/product/mutations/products.py 96.05% <100%> (ø) ⬆️
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cc6cbe...f2301d1. Read the comment docs.

@maarcingebala maarcingebala merged commit ee9fd43 into saleor:master Jan 2, 2019
@maarcingebala maarcingebala deleted the extract-enums branch January 2, 2019 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graphql Issues related to the GraphQL API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants