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

Extend payment gateway GraphQL type #4774

Merged
merged 14 commits into from
Oct 1, 2019
Merged

Conversation

salwator
Copy link
Contributor

@salwator salwator commented Sep 27, 2019

Fixes #4772

Roadmap:

  • Extend GraphQL schema
  • Add new plugin method
  • Serve config from gateways:
    • Dummy (sample store_customer)
    • Stripe (api_key, store_customer)
    • Braintree (client_token, store_customer)
  • Align tests and types

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. GraphQL schema and type definitions are up to date.
  8. Changes are mentioned in the changelog.

@salwator salwator changed the title Extend gateway GraphQL type Extend payment gateway GraphQL type Sep 27, 2019
Copy link

django-queries commented Sep 27, 2019

Here is the report for 346bc46 (mirumee/saleor @ extend-gateway-graphql-type)
Base comparison is a54cbf6.

**Found 2 differences!** (click me)

# api.benchmark checkout
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
+ add billing address to checkout            	         38	         34	             20
  add shipping to checkout                   	          7	          7	              0
  checkout payment charge                    	         14	         14	              0
  complete checkout                          	          6	          6	              0
+ create checkout                            	         52	         48	             24

# api.benchmark homepage
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  retrieve main menu                         	          5	          5	              0
  retrieve product list                      	          4	          4	              0
  retrieve secondary menu                    	          5	          5	              0
  retrieve shop                              	          2	          2	              0

# api.benchmark product
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product details                            	         15	         15	              3
  retrieve product attributes                	         13	         13	              2

# api.benchmark variant
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  retrieve variant list                      	         18	         18	              8

# api product sorting attributes
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  sort product not having attribute data     	         21	         21	              0

@codecov
Copy link

codecov bot commented Sep 27, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@a54cbf6). Click here to learn what that means.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4774   +/-   ##
=========================================
  Coverage          ?   91.23%           
=========================================
  Files             ?      343           
  Lines             ?    20551           
  Branches          ?     1954           
=========================================
  Hits              ?    18749           
  Misses            ?     1264           
  Partials          ?      538
Impacted Files Coverage Δ
saleor/payment/gateways/braintree/plugin.py 0% <0%> (ø)
saleor/payment/gateways/stripe/plugin.py 0% <0%> (ø)
saleor/extensions/base_plugin.py 90.16% <100%> (ø)
saleor/payment/gateways/stripe/__init__.py 98.87% <100%> (ø)
saleor/graphql/checkout/types.py 94.73% <100%> (ø)
saleor/extensions/manager.py 88.2% <100%> (ø)
saleor/payment/gateways/braintree/__init__.py 93.75% <100%> (ø)
saleor/payment/gateways/dummy/plugin.py 92.3% <100%> (ø)
saleor/payment/gateway.py 95.52% <100%> (ø)

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 a54cbf6...346bc46. Read the comment docs.

@salwator salwator marked this pull request as ready for review September 27, 2019 14:58
saleor/graphql/checkout/types.py Outdated Show resolved Hide resolved
saleor/graphql/checkout/types.py Outdated Show resolved Hide resolved
saleor/graphql/checkout/types.py Outdated Show resolved Hide resolved
saleor/graphql/checkout/types.py Outdated Show resolved Hide resolved
saleor/payment/gateways/braintree/plugin.py Show resolved Hide resolved
salwator and others added 2 commits September 30, 2019 16:20
Co-Authored-By: Marcin Gębala <5421321+maarcingebala@users.noreply.github.com>
@salwator salwator added graphql Issues related to the GraphQL API payments Issues related to payments implementation labels Sep 30, 2019
@maarcingebala maarcingebala merged commit e1aabe2 into master Oct 1, 2019
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 payments Issues related to payments implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend payment gateway object in checkout
5 participants