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

jamesporl
Copy link
Contributor

@jamesporl jamesporl 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.

@brent-hoover brent-hoover changed the base branch from master to release-2.0.0-rc.6 November 9, 2018 08:43
@aldeed aldeed changed the base branch from release-2.0.0-rc.6 to release-2.0.0-rc.7 November 9, 2018 16:24
Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

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.

@brent-hoover
Copy link
Collaborator

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

@jamesporl
Copy link
Contributor Author

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.

@brent-hoover
Copy link
Collaborator

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.

Copy link
Collaborator

@brent-hoover brent-hoover left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor

aldeed 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
@spencern spencern deleted the fix-4759-ajporlante-support-extend-in-graphql branch November 15, 2018 00:01
@spencern spencern mentioned this pull request Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants