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

Update graphql packages to support extend enum and extend union #4798

Merged

Conversation

4 participants
@ajporlante
Copy link
Contributor

commented Nov 9, 2018

Resolves #4759
Impact: minor
Type: refactor

Issue

We are unable to add custom payment methods without modifying core code as some parts of the schema have to be extended in the plugins. Particularly, we have to use extend union and extend enum in custom plugins, but these graphql specs are not supported in the version of graphql and graphql-tools that Reaction currently uses.

Solution

Upgrading graphql andgraphql-tools to the respective latest releases enables supporting extend union and extend enum.

Breaking changes

None

Testing

In the graphql UI, search for PaymentMethodName and PaymentData in the schema docs. See that PaymentMethodName includes stripe_card as an option and StripeCardPaymentData as possible type.

@ajporlante ajporlante requested review from aldeed and zenweasel Nov 9, 2018

Show resolved Hide resolved package.json

@zenweasel zenweasel changed the base branch from master to release-2.0.0-rc.6 Nov 9, 2018

@ajporlante ajporlante requested a review from rosshadden Nov 9, 2018

@aldeed aldeed changed the base branch from release-2.0.0-rc.6 to release-2.0.0-rc.7 Nov 9, 2018

@aldeed

aldeed approved these changes Nov 9, 2018

Copy link
Member

left a comment

Changes look good but I don't have time to test the app thoroughly right now. If @zenweasel or @rosshadden can do some minimal smoke tests, I'm down with merging this. We can roll back pretty easily if it leads to issues that aren't easily fixed, and it'll get a thorough test during RC7 release testing.

@zenweasel

This comment has been minimized.

Copy link
Member

commented Nov 12, 2018

For some reason I am not able to check out in the StarterKit although I can checkout in the Classic UI. I am getting no shipping methods even though they are configured

@ajporlante

This comment has been minimized.

Copy link
Contributor Author

commented Nov 12, 2018

Hi @zenweasel , I think the fulfillment methods are loaded to cart when cart is created and not updated when fulfillment methods are enabled/disabled. So a new cart needs to be created to load the available fulfillment methods into the cart and the UI.

I am also unable to make the availablePaymentMethods query work, but I think that's a bug that is outside the scope of this PR.

@zenweasel

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

I am getting a ton of new graphql/apollo package dependency warnings. I have done npm install already.

reaction_1  | npm WARN apollo-cache-control@0.1.1 requires a peer of graphql@0.10.x - 0.13.x but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-cache-inmemory@1.2.5 requires a peer of graphql@0.11.7 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-client@2.3.5 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-link@1.2.2 requires a peer of graphql@^0.11.3 || ^0.12.3 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-link-http@1.5.4 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-link-http-common@0.2.4 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-server-core@1.4.0 requires a peer of graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN apollo-tracing@0.1.4 requires a peer of graphql@0.10.x - 0.13.x but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN graphql-extensions@0.0.10 requires a peer of graphql@0.10.x - 0.13.x but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN graphql-iso-date@3.5.0 requires a peer of graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN graphql-relay@0.5.5 requires a peer of graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
reaction_1  | npm WARN graphql-tag@2.9.2 requires a peer of graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself.
@zenweasel
Copy link
Member

left a comment

Ran some smoke tests and seems to be fine. There are failing tests though. Also would like to get the npm warnings worked out though I don't think we need to handle that now

@aldeed

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

I pushed a commit to fix the failing unit tests

@spencern spencern merged commit 8138a61 into release-2.0.0-rc.7 Nov 15, 2018

4 checks passed

License Compliance Analysis timed out. Check FOSSA for updates.
Details
WIP ready for review
Details
build_and_test Workflow: build_and_test
Details
security/snyk - package.json (Reaction Commerce) No new issues
Details

@spencern spencern deleted the fix-4759-ajporlante-support-extend-in-graphql branch Nov 15, 2018

@spencern spencern referenced this pull request Jan 8, 2019

Merged

Release 2.0.0 rc.8 #4896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.