From 39edbe5ee627a13ad408ccd964f2b1279df30199 Mon Sep 17 00:00:00 2001 From: gabrielmeloc22 Date: Sat, 10 Aug 2024 17:20:36 -0300 Subject: [PATCH] fix: generate missing types and adjust fly config --- .../chatCreateGroupMutation.graphql.ts | 114 ++++++------------ .../useInboxSubscription.graphql.ts | 13 +- fly.toml | 22 ++-- 3 files changed, 54 insertions(+), 95 deletions(-) diff --git a/apps/web/__generated__/chatCreateGroupMutation.graphql.ts b/apps/web/__generated__/chatCreateGroupMutation.graphql.ts index 2884440..0972208 100644 --- a/apps/web/__generated__/chatCreateGroupMutation.graphql.ts +++ b/apps/web/__generated__/chatCreateGroupMutation.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<06c24e1e216775ed51db3a0b1fdba5a6>> * @lightSyntaxTransform * @nogrep */ @@ -20,7 +20,7 @@ export type chatCreateGroupMutation$variables = { export type chatCreateGroupMutation$data = { readonly createGroupChat: { readonly chat: { - readonly _id: string; + readonly id: string; } | null | undefined; readonly clientMutationId: string | null | undefined; } | null | undefined; @@ -40,57 +40,55 @@ var v0 = [ ], v1 = [ { - "kind": "Variable", - "name": "input", - "variableName": "input" - } -], -v2 = { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "clientMutationId", - "storageKey": null -}, -v3 = { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "_id", - "storageKey": null -}; -return { - "fragment": { - "argumentDefinitions": (v0/*: any*/), - "kind": "Fragment", - "metadata": null, - "name": "chatCreateGroupMutation", + "alias": null, + "args": [ + { + "kind": "Variable", + "name": "input", + "variableName": "input" + } + ], + "concreteType": "CreateGroupChatPayload", + "kind": "LinkedField", + "name": "createGroupChat", + "plural": false, "selections": [ { "alias": null, - "args": (v1/*: any*/), - "concreteType": "CreateGroupChatPayload", + "args": null, + "kind": "ScalarField", + "name": "clientMutationId", + "storageKey": null + }, + { + "alias": null, + "args": null, + "concreteType": "Chat", "kind": "LinkedField", - "name": "createGroupChat", + "name": "chat", "plural": false, "selections": [ - (v2/*: any*/), { "alias": null, "args": null, - "concreteType": "Chat", - "kind": "LinkedField", - "name": "chat", - "plural": false, - "selections": [ - (v3/*: any*/) - ], + "kind": "ScalarField", + "name": "id", "storageKey": null } ], "storageKey": null } ], + "storageKey": null + } +]; +return { + "fragment": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Fragment", + "metadata": null, + "name": "chatCreateGroupMutation", + "selections": (v1/*: any*/), "type": "mutation", "abstractKey": null }, @@ -99,51 +97,19 @@ return { "argumentDefinitions": (v0/*: any*/), "kind": "Operation", "name": "chatCreateGroupMutation", - "selections": [ - { - "alias": null, - "args": (v1/*: any*/), - "concreteType": "CreateGroupChatPayload", - "kind": "LinkedField", - "name": "createGroupChat", - "plural": false, - "selections": [ - (v2/*: any*/), - { - "alias": null, - "args": null, - "concreteType": "Chat", - "kind": "LinkedField", - "name": "chat", - "plural": false, - "selections": [ - (v3/*: any*/), - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "id", - "storageKey": null - } - ], - "storageKey": null - } - ], - "storageKey": null - } - ] + "selections": (v1/*: any*/) }, "params": { - "cacheID": "e65cade2d26d111a3dde52d3e7edb418", + "cacheID": "af32d45b8499d05cf1e8b8131dda92c2", "id": null, "metadata": {}, "name": "chatCreateGroupMutation", "operationKind": "mutation", - "text": "mutation chatCreateGroupMutation(\n $input: CreateGroupChatInput!\n) {\n createGroupChat(input: $input) {\n clientMutationId\n chat {\n _id\n id\n }\n }\n}\n" + "text": "mutation chatCreateGroupMutation(\n $input: CreateGroupChatInput!\n) {\n createGroupChat(input: $input) {\n clientMutationId\n chat {\n id\n }\n }\n}\n" } }; })(); -(node as any).hash = "55706f5b33531f34f587c221b50e8951"; +(node as any).hash = "6f534c4d87353e791527f753278e8b8a"; export default node; diff --git a/apps/web/__generated__/useInboxSubscription.graphql.ts b/apps/web/__generated__/useInboxSubscription.graphql.ts index b1ec47c..f3c3156 100644 --- a/apps/web/__generated__/useInboxSubscription.graphql.ts +++ b/apps/web/__generated__/useInboxSubscription.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<33a4a2cea7c5f0af22d5d69172d69158>> + * @generated SignedSource<<94f6d63ce001ec51e6f93931350998d2>> * @lightSyntaxTransform * @nogrep */ @@ -384,13 +384,6 @@ return { ], "storageKey": null }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "localId", - "storageKey": null - }, (v12/*: any*/), { "alias": null, @@ -433,12 +426,12 @@ return { ] }, "params": { - "cacheID": "b836ee4584f4f8d13f0707c8f81fd43a", + "cacheID": "b24ba7a7dbc3c8b71766e36ee69bd637", "id": null, "metadata": {}, "name": "useInboxSubscription", "operationKind": "subscription", - "text": "subscription useInboxSubscription(\n $input: MessageInput!\n) {\n onMessage(input: $input) {\n newChat\n deletedMessages\n deletedChat\n chat {\n id\n group\n user {\n id\n }\n updatedAt\n ...chatItemFragment\n }\n newMessage {\n node {\n id\n from {\n id\n }\n ...chatMessageFragment\n }\n }\n }\n}\n\nfragment chatItemFragment on Chat {\n id\n name\n group\n user {\n id\n username\n avatar\n }\n lastMessage {\n node {\n id\n createdAt\n content\n }\n }\n}\n\nfragment chatMessageFragment on Message {\n id\n from {\n id\n username\n avatar\n }\n chat {\n node {\n group\n id\n }\n }\n localId\n content\n seen\n createdAt\n seenAt\n delivered\n deliveredAt\n}\n" + "text": "subscription useInboxSubscription(\n $input: MessageInput!\n) {\n onMessage(input: $input) {\n newChat\n deletedMessages\n deletedChat\n chat {\n id\n group\n user {\n id\n }\n updatedAt\n ...chatItemFragment\n }\n newMessage {\n node {\n id\n from {\n id\n }\n ...chatMessageFragment\n }\n }\n }\n}\n\nfragment chatItemFragment on Chat {\n id\n name\n group\n user {\n id\n username\n avatar\n }\n lastMessage {\n node {\n id\n createdAt\n content\n }\n }\n}\n\nfragment chatMessageFragment on Message {\n id\n from {\n id\n username\n avatar\n }\n chat {\n node {\n group\n id\n }\n }\n content\n seen\n createdAt\n seenAt\n delivered\n deliveredAt\n}\n" } }; })(); diff --git a/fly.toml b/fly.toml index 0115f1b..a5a4ae9 100644 --- a/fly.toml +++ b/fly.toml @@ -7,20 +7,20 @@ app = 'telegrama' primary_region = 'gru' [build] - dockerfile = './apps/server/Dockerfile' +dockerfile = './apps/server/Dockerfile' [env] - PORT = '8080' +PORT = '8080' [http_service] - internal_port = 8080 - force_https = true - auto_stop_machines = true - auto_start_machines = true - min_machines_running = 0 - processes = ['app'] +internal_port = 8080 +force_https = true +auto_stop_machines = "stop" +auto_start_machines = true +min_machines_running = 0 +processes = ['app'] [[vm]] - memory = '1gb' - cpu_kind = 'shared' - cpus = 1 +memory = '1gb' +cpu_kind = 'shared' +cpus = 1