-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Can't add a payment provider w/o modifying core #4759
Comments
Note that this is a limitation of the Node GraphQL library. It's part of the official GraphQL spec but not the official GraphQL Node library yet. I do plan to try updating to the latest version of that, but it's unclear whether they have added support for these extensions yet. |
It appears that v14.x included support for extending enums and unions based on graphql/graphql-js#1095 being closed by graphql/graphql-js#1373 and the release notes for v14.0.0 There are breaking changes in this version of GraphQL, so it's unclear what our path to this is, but the first step would be someone trying it out and noting what breaks. |
I tried upgrading to |
@ajporlante I believe we don't actually check |
@ajporlante did |
@spencern yes, I see that But like I said, I tried using this version and I am honestly not sure what to do next. @aldeed 's solution will surely work, but it requires patching some core code. |
If |
@ajporlante You shouldn't need to modify core to do what I think you are trying to do, or at least that was the goal. Although the Upgrading GraphQL would be great, but not doing so (yet) shouldn't prevent you from doing what you need to. |
@ajporlante Can you verify that if we can make the above change to Payment@data that we can add this payment method w/o modifying core? If so we can just make that change and move forward. |
@ajporlante If you did not, try bumping the |
The only other pkgs that might impact it working would be I would probably bump all of the |
@aldeed These changes seem to make things work:
I just had to remove some redundant definitions in the core schema. I will create a PR for these updates. Having said these, @zenweasel @rosshadden we don't have to modify |
@ajporlante Great! Let's just make sure let's keep an eye out for any issues and give this a good test. I think this results in a much cleaner and easier to understand API |
Issue Description
Currently the available payment methods are hard-coded into the Reaction Meteor app. This means that plugins have no way of extending it to add or remove a payment method.
Comments in the code seem to indicate that
extend union
andextend enum
were meant to be used here but these are currently unimplemented.Current code in
imports/plugins/core/payments/server/no-meteor/schemas/schema.graphql
looks like this:My solution at the moment is to write custom code into this file which can be avoided if both
extend union
andextend enum
are supported.Versions
The text was updated successfully, but these errors were encountered: