1

I want to extend graphql mutation so that I can make one field optional in the input params in braintree module. Below is the file path

Core GraphQL Schema File: vendor\paypal\module-braintree-graph-ql\etc\schema.graphqls

Input Params: BraintreeInput

If you see there are payment nonce mandatory in the Input params. We have requirement to by pass that and make payment nonce optional. I have written my own module for the same. I just want to know how I can do that?

1 Answer 1

1

Copy the following code into your module schema.graphql and remove the ! exclamation mark (!).

input BraintreeInput { payment_method_nonce: String! @doc(description:"The one-time payment token generated by Braintree payment gateway based on card details. Required field to make sale transaction.") is_active_payment_token_enabler: Boolean! @doc(description:"States whether an entered by a customer credit/debit card should be tokenized for later usage. Required only if Vault is enabled for Braintree payment integration.") device_data: String @doc(description:"Contains a fingerprint provided by Braintree JS SDK and should be sent with sale transaction details to the Braintree payment gateway. Should be specified only in a case if Kount (advanced fraud protection) is enabled for Braintree payment integration.") } 

Make Sure you add the following to your module.xml

<sequence> <module name="PayPal_BraintreeGraphQl"/> </sequence> 
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you Abid Malik, it saves alot of my time

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.