Skip to content

Commit 95384d8

Browse files
Send websocketUrl only on create
1 parent 20c97cc commit 95384d8

File tree

9 files changed

+13
-31
lines changed

9 files changed

+13
-31
lines changed

packages/app/src/cli/api/graphql/app-dev/generated/dev-session-create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type DevSessionCreateMutation = {
1616
} | null
1717
}
1818

19-
export const DevSessionCreateDocument = {
19+
export const DevSessionCreate = {
2020
kind: 'Document',
2121
definitions: [
2222
{

packages/app/src/cli/api/graphql/app-dev/generated/dev-session-delete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type DevSessionDeleteMutationVariables = Types.Exact<{
99

1010
export type DevSessionDeleteMutation = {devSessionDelete?: {userErrors: {message: string}[]} | null}
1111

12-
export const DevSessionDeleteDocument = {
12+
export const DevSessionDelete = {
1313
kind: 'Document',
1414
definitions: [
1515
{

packages/app/src/cli/api/graphql/app-dev/generated/dev-session-update.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {TypedDocumentNode as DocumentNode} from '@graphql-typed-document-node/co
77
export type DevSessionUpdateMutationVariables = Types.Exact<{
88
appId: Types.Scalars['String']['input']
99
assetsUrl?: Types.InputMaybe<Types.Scalars['String']['input']>
10-
websocketUrl?: Types.InputMaybe<Types.Scalars['String']['input']>
1110
manifest?: Types.InputMaybe<Types.Scalars['JSON']['input']>
1211
inheritedModuleUids: Types.Scalars['String']['input'][] | Types.Scalars['String']['input']
1312
}>
@@ -18,7 +17,7 @@ export type DevSessionUpdateMutation = {
1817
} | null
1918
}
2019

21-
export const DevSessionUpdateDocument = {
20+
export const DevSessionUpdate = {
2221
kind: 'Document',
2322
definitions: [
2423
{
@@ -36,11 +35,6 @@ export const DevSessionUpdateDocument = {
3635
variable: {kind: 'Variable', name: {kind: 'Name', value: 'assetsUrl'}},
3736
type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}},
3837
},
39-
{
40-
kind: 'VariableDefinition',
41-
variable: {kind: 'Variable', name: {kind: 'Name', value: 'websocketUrl'}},
42-
type: {kind: 'NamedType', name: {kind: 'Name', value: 'String'}},
43-
},
4438
{
4539
kind: 'VariableDefinition',
4640
variable: {kind: 'Variable', name: {kind: 'Name', value: 'manifest'}},
@@ -75,11 +69,6 @@ export const DevSessionUpdateDocument = {
7569
name: {kind: 'Name', value: 'assetsUrl'},
7670
value: {kind: 'Variable', name: {kind: 'Name', value: 'assetsUrl'}},
7771
},
78-
{
79-
kind: 'Argument',
80-
name: {kind: 'Name', value: 'websocketUrl'},
81-
value: {kind: 'Variable', name: {kind: 'Name', value: 'websocketUrl'}},
82-
},
8372
{
8473
kind: 'Argument',
8574
name: {kind: 'Name', value: 'manifest'},

packages/app/src/cli/api/graphql/app-dev/queries/dev-session-update.graphql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mutation DevSessionUpdate($appId: String!, $assetsUrl: String, $websocketUrl: String, $manifest: JSON, $inheritedModuleUids: [String!]!) {
2-
devSessionUpdate(appId: $appId, assetsUrl: $assetsUrl, websocketUrl: $websocketUrl, manifest: $manifest, inheritedModuleUids: $inheritedModuleUids) {
1+
mutation DevSessionUpdate($appId: String!, $assetsUrl: String, $manifest: JSON, $inheritedModuleUids: [String!]!) {
2+
devSessionUpdate(appId: $appId, assetsUrl: $assetsUrl, manifest: $manifest, inheritedModuleUids: $inheritedModuleUids) {
33
userErrors {
44
message
55
on

packages/app/src/cli/api/graphql/business-platform-organizations/generated/types.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* eslint-disable @typescript-eslint/consistent-type-definitions, @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any */
2+
import {JsonMapType} from '@shopify/cli-kit/node/toml'
3+
24
export type Maybe<T> = T | null
35
export type InputMaybe<T> = Maybe<T>
46
export type Exact<T extends {[key: string]: unknown}> = {[K in keyof T]: T[K]}
@@ -40,6 +42,8 @@ export type Scalars = {
4042
ISO8601Date: {input: any; output: any}
4143
/** An ISO 8601-encoded datetime */
4244
ISO8601DateTime: {input: any; output: any}
45+
/** Represents untyped JSON */
46+
JSON: {input: JsonMapType | string; output: JsonMapType}
4347
/** The ID for a LegalEntity. */
4448
LegalEntityID: {input: any; output: any}
4549
/** The ID for a OrganizationDomain. */

packages/app/src/cli/services/dev/processes/dev-session/dev-session-process.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,13 @@ describe('pushUpdatesForDevSession', () => {
407407
appId: 'app123',
408408
// Assets URL is empty because the affected extension has no assets
409409
assetsUrl: undefined,
410-
websocketUrl: 'wss://test.dev/extensions',
411410
manifest: {
412411
name: 'App',
413412
handle: '',
414413
modules: [
415414
{
416415
uid: 'test-ui-extension-uid',
416+
uuid: undefined,
417417
assets: 'test-ui-extension-uid',
418418
handle: updatedExtension.handle,
419419
type: updatedExtension.externalType,
@@ -453,7 +453,6 @@ describe('pushUpdatesForDevSession', () => {
453453
shopFqdn: 'test.myshopify.com',
454454
appId: 'app123',
455455
assetsUrl: 'https://gcs.url',
456-
websocketUrl: 'wss://test.dev/extensions',
457456
manifest: expect.any(Object),
458457
inheritedModuleUids: [],
459458
})

packages/app/src/cli/services/dev/processes/dev-session/dev-session.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ export class DevSession {
285285
assetsUrl: signedURL,
286286
manifest,
287287
inheritedModuleUids,
288-
websocketUrl,
289288
}
290289
return this.devSessionUpdateWithRetry(payload)
291290
} else {

packages/app/src/cli/utilities/developer-platform-client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ export interface DevSessionUpdateOptions extends DevSessionSharedOptions {
174174
assetsUrl?: string
175175
manifest: AppManifest
176176
inheritedModuleUids: string[]
177-
websocketUrl?: string
178177
}
179178

180179
export type DevSessionDeleteOptions = DevSessionSharedOptions

packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,13 @@ import {AppHomeSpecIdentifier} from '../../models/extensions/specifications/app_
7979
import {BrandingSpecIdentifier} from '../../models/extensions/specifications/app_config_branding.js'
8080
import {AppAccessSpecIdentifier} from '../../models/extensions/specifications/app_config_app_access.js'
8181
import {CONFIG_EXTENSION_IDS} from '../../models/extensions/extension-instance.js'
82+
import {DevSessionCreate, DevSessionCreateMutation} from '../../api/graphql/app-dev/generated/dev-session-create.js'
8283
import {
83-
DevSessionCreateDocument as DevSessionCreate,
84-
DevSessionCreateMutation,
85-
} from '../../api/graphql/app-dev/generated/dev-session-create.js'
86-
import {
87-
DevSessionUpdateDocument as DevSessionUpdate,
84+
DevSessionUpdate,
8885
DevSessionUpdateMutation,
8986
DevSessionUpdateMutationVariables,
9087
} from '../../api/graphql/app-dev/generated/dev-session-update.js'
91-
import {
92-
DevSessionDeleteDocument as DevSessionDelete,
93-
DevSessionDeleteMutation,
94-
} from '../../api/graphql/app-dev/generated/dev-session-delete.js'
88+
import {DevSessionDelete, DevSessionDeleteMutation} from '../../api/graphql/app-dev/generated/dev-session-delete.js'
9589
import {
9690
FetchStoreByDomain,
9791
FetchStoreByDomainQueryVariables,
@@ -1044,15 +1038,13 @@ export class AppManagementClient implements DeveloperPlatformClient {
10441038
shopFqdn,
10451039
manifest,
10461040
inheritedModuleUids,
1047-
websocketUrl,
10481041
}: DevSessionUpdateOptions): Promise<DevSessionUpdateMutation> {
10491042
const appIdNumber = String(numberFromGid(appId))
10501043
const variables: DevSessionUpdateMutationVariables = {
10511044
appId: appIdNumber,
10521045
assetsUrl,
10531046
manifest: JSON.stringify(manifest),
10541047
inheritedModuleUids,
1055-
websocketUrl,
10561048
}
10571049
return this.appDevRequest({query: DevSessionUpdate, shopFqdn, variables})
10581050
}

0 commit comments

Comments
 (0)