Skip to content

Commit e5504b4

Browse files
Remove sessionId from discount mutation (#1231)
* remove sessionid requirement for apply coupon * add changeset
1 parent 2cf3911 commit e5504b4

File tree

3 files changed

+13
-93
lines changed

3 files changed

+13
-93
lines changed

.changeset/wicked-rats-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@godaddy/react": patch
3+
---
4+
5+
remove sessionId requirement for applyDiscount

packages/react/src/lib/godaddy/checkout-env.ts

Lines changed: 6 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -6338,11 +6338,8 @@ const introspection = {
63386338
{
63396339
name: 'sessionId',
63406340
type: {
6341-
kind: 'NON_NULL',
6342-
ofType: {
6343-
kind: 'SCALAR',
6344-
name: 'String',
6345-
},
6341+
kind: 'SCALAR',
6342+
name: 'String',
63466343
},
63476344
},
63486345
],
@@ -6444,11 +6441,8 @@ const introspection = {
64446441
{
64456442
name: 'sessionId',
64466443
type: {
6447-
kind: 'NON_NULL',
6448-
ofType: {
6449-
kind: 'SCALAR',
6450-
name: 'String',
6451-
},
6444+
kind: 'SCALAR',
6445+
name: 'String',
64526446
},
64536447
},
64546448
],
@@ -6796,11 +6790,8 @@ const introspection = {
67966790
{
67976791
name: 'channelId',
67986792
type: {
6799-
kind: 'NON_NULL',
6800-
ofType: {
6801-
kind: 'SCALAR',
6802-
name: 'String',
6803-
},
6793+
kind: 'SCALAR',
6794+
name: 'String',
68046795
},
68056796
},
68066797
{
@@ -8315,24 +8306,6 @@ const introspection = {
83158306
args: [],
83168307
isDeprecated: false,
83178308
},
8318-
{
8319-
name: 'mediaObjects',
8320-
type: {
8321-
kind: 'NON_NULL',
8322-
ofType: {
8323-
kind: 'LIST',
8324-
ofType: {
8325-
kind: 'NON_NULL',
8326-
ofType: {
8327-
kind: 'OBJECT',
8328-
name: 'SKUMediaObject',
8329-
},
8330-
},
8331-
},
8332-
},
8333-
args: [],
8334-
isDeprecated: false,
8335-
},
83368309
{
83378310
name: 'metafields',
83388311
type: {
@@ -8562,64 +8535,6 @@ const introspection = {
85628535
],
85638536
interfaces: [],
85648537
},
8565-
{
8566-
kind: 'OBJECT',
8567-
name: 'SKUMediaObject',
8568-
fields: [
8569-
{
8570-
name: 'id',
8571-
type: {
8572-
kind: 'NON_NULL',
8573-
ofType: {
8574-
kind: 'SCALAR',
8575-
name: 'ID',
8576-
},
8577-
},
8578-
args: [],
8579-
isDeprecated: false,
8580-
},
8581-
{
8582-
name: 'label',
8583-
type: {
8584-
kind: 'SCALAR',
8585-
name: 'String',
8586-
},
8587-
args: [],
8588-
isDeprecated: false,
8589-
},
8590-
{
8591-
name: 'name',
8592-
type: {
8593-
kind: 'SCALAR',
8594-
name: 'String',
8595-
},
8596-
args: [],
8597-
isDeprecated: false,
8598-
},
8599-
{
8600-
name: 'type',
8601-
type: {
8602-
kind: 'SCALAR',
8603-
name: 'String',
8604-
},
8605-
args: [],
8606-
isDeprecated: false,
8607-
},
8608-
{
8609-
name: 'url',
8610-
type: {
8611-
kind: 'NON_NULL',
8612-
ofType: {
8613-
kind: 'SCALAR',
8614-
name: 'String',
8615-
},
8616-
},
8617-
args: [],
8618-
isDeprecated: false,
8619-
},
8620-
],
8621-
interfaces: [],
8622-
},
86238538
{
86248539
kind: 'OBJECT',
86258540
name: 'SKUMetafield',

packages/react/src/lib/godaddy/checkout-mutations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ export const CalculateCheckoutSessionTaxesMutation = graphql(`
283283
`);
284284

285285
export const ApplyCheckoutSessionDiscountMutation = graphql(`
286-
mutation ApplyCheckoutSessionDiscount($input: MutationApplyCheckoutSessionDiscountInput!, $sessionId: String!) {
287-
applyCheckoutSessionDiscount(input: $input, sessionId: $sessionId) {
286+
mutation ApplyCheckoutSessionDiscount($input: MutationApplyCheckoutSessionDiscountInput!) {
287+
applyCheckoutSessionDiscount(input: $input) {
288288
id
289289
lineItems {
290290
externalId

0 commit comments

Comments
 (0)