diff --git a/.changeset/wicked-rats-cover.md b/.changeset/wicked-rats-cover.md new file mode 100644 index 00000000..b8c40626 --- /dev/null +++ b/.changeset/wicked-rats-cover.md @@ -0,0 +1,5 @@ +--- +"@godaddy/react": patch +--- + +remove sessionId requirement for applyDiscount diff --git a/packages/react/src/lib/godaddy/checkout-env.ts b/packages/react/src/lib/godaddy/checkout-env.ts index 75f0599b..024dbb84 100644 --- a/packages/react/src/lib/godaddy/checkout-env.ts +++ b/packages/react/src/lib/godaddy/checkout-env.ts @@ -6338,11 +6338,8 @@ const introspection = { { name: 'sessionId', type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + kind: 'SCALAR', + name: 'String', }, }, ], @@ -6444,11 +6441,8 @@ const introspection = { { name: 'sessionId', type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + kind: 'SCALAR', + name: 'String', }, }, ], @@ -6796,11 +6790,8 @@ const introspection = { { name: 'channelId', type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + kind: 'SCALAR', + name: 'String', }, }, { @@ -8315,24 +8306,6 @@ const introspection = { args: [], isDeprecated: false, }, - { - name: 'mediaObjects', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUMediaObject', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, { name: 'metafields', type: { @@ -8562,64 +8535,6 @@ const introspection = { ], interfaces: [], }, - { - kind: 'OBJECT', - name: 'SKUMediaObject', - fields: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'url', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, { kind: 'OBJECT', name: 'SKUMetafield', diff --git a/packages/react/src/lib/godaddy/checkout-mutations.ts b/packages/react/src/lib/godaddy/checkout-mutations.ts index 92577dba..e6778eab 100644 --- a/packages/react/src/lib/godaddy/checkout-mutations.ts +++ b/packages/react/src/lib/godaddy/checkout-mutations.ts @@ -283,8 +283,8 @@ export const CalculateCheckoutSessionTaxesMutation = graphql(` `); export const ApplyCheckoutSessionDiscountMutation = graphql(` - mutation ApplyCheckoutSessionDiscount($input: MutationApplyCheckoutSessionDiscountInput!, $sessionId: String!) { - applyCheckoutSessionDiscount(input: $input, sessionId: $sessionId) { + mutation ApplyCheckoutSessionDiscount($input: MutationApplyCheckoutSessionDiscountInput!) { + applyCheckoutSessionDiscount(input: $input) { id lineItems { externalId