From 6ba0a1fcd3a3dc23ca6d7dfaec1b41d091b276de Mon Sep 17 00:00:00 2001 From: Purnendu Date: Fri, 27 Dec 2024 04:37:47 +0530 Subject: [PATCH 01/16] added installation script and modify talawa-api.sh --- example/linux/installation.md | 62 ++++++ example/linux/systemd/Talawa-api.sh | 52 +++++ example/linux/systemd/talawa-api.service | 39 ++++ schema.graphql | 268 ++++++++++++++++++++++- test/routes/graphql/gql.tada-cache.d.ts | 22 +- 5 files changed, 428 insertions(+), 15 deletions(-) create mode 100644 example/linux/installation.md create mode 100755 example/linux/systemd/Talawa-api.sh create mode 100644 example/linux/systemd/talawa-api.service diff --git a/example/linux/installation.md b/example/linux/installation.md new file mode 100644 index 0000000000..a527d7dde1 --- /dev/null +++ b/example/linux/installation.md @@ -0,0 +1,62 @@ +# Talawa API Installation Guide + +This guide provides step-by-step instructions for setting up the Talawa API service on a Linux system using systemd. + +## Prerequisites + +- Node.js (version 20.18.0 or current version the app is running on) (Ensure the Linux Node.js version matches the app version) +- nvm (Node Version Manager) +- tsx (TypeScript execution environment should be installed globally. Command : npm install -g tsx ) +- A Linux system with systemd +- For development, first run manually to see if it is working. Check the `.env` file to ensure `NODE_ENV` is set to `development`. +- For production, first build the app to generate the `dist` folder, then set `NODE_ENV` to `production`. +- Ensure you provide the correct paths for each configuration to avoid errors. +- The service dynamically starts the development and production server based on the `.env` configuration, so verify it before making any changes. +- Always check the log files to identify errors. + +## Steps + +1. **Create the Systemd Service File**: + - Create a file named `talawa-api.service` in the `/etc/systemd/system` directory. Ensure you have root privileges. + +2. **Edit the `talawa-api.service` File**: + - Modify the `talawa-api.service` file as required (e.g., `ExecStart`, `WorkingDirectory`, `User`, `Group`). You can find how to edit these fields in the `talawa-api.service` file located in `example/linux/systemd`. + +3. **Copy the Configuration**: + - Copy the text into the `talawa-api.service` file located in `/etc/systemd/system` and save it. + +4. **Edit the `Talawa-api.sh` Script**: + - Edit the `Talawa-api.sh` script to set the project directory and log file path: + ```bash + # Change to the project directory + cd /home/purnendu/Development/talawa-api + + # Define log file + LOG_FILE="/home/purnendu/Development/talawa-api/example/linux/talawa-api.log" + ``` + +## Commands to Follow in Sequence + +1. **Reload the Systemd Configuration**: + sudo systemctl daemon-reload + +2. **Enable the Talawa API Service (required the first time):**: + sudo systemctl enable talawa-api.service + +3. **Start the Talawa API Service:**: + sudo systemctl start talawa-api.service + +4. **Check the Status of the Talawa API Service:**: + sudo systemctl status talawa-api.service + +5. **View the Logs in Real-Time**: + sudo journalctl -u talawa-api.service -f + +6. **Stop the Talawa API Service:**: + sudo systemctl stop talawa-api.service + +7. **Restart the Talawa API Service:**: + sudo systemctl restart talawa-api.service + +8. **Also u can see direct log stored in /talawa-api/example/linux/talawa-api.log :** + cat pathOfLogFile \ No newline at end of file diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh new file mode 100755 index 0000000000..196330a4d3 --- /dev/null +++ b/example/linux/systemd/Talawa-api.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# filepath: eg: /home/purnendu/Development/talawa-api/example/linux/systemd/Talawa-api.sh + +# Load nvm and use the correct Node.js version +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +nvm use 20.18.0 + +# Define the path to the tsx executable dynamically +TSX_PATH=$(which tsx) + +# Define paths for development and production +DEV_PATH="src/index.ts" +PROD_PATH="dist/index.js" + +# Change to the project directory .give your path +cd /home/purnendu/Development/talawa-api + +# Load environment variables from .env file +export $(grep -v '^#' .env | xargs) + +# Define log file give your path +LOG_FILE="/home/purnendu/Development/talawa-api/example/linux/talawa-api.log" + +# Ensure the log file exists +touch $LOG_FILE + +# Debugging: Output environment variables +{ + echo "NODE_ENV is: $NODE_ENV" + echo "Starting directory is: $PWD" + + # Log the Node.js version + echo "Node.js version:" + node -v + + # Log the current directory + echo "Current directory:" + pwd + + # Check the value of NODE_ENV and execute the corresponding command + if [ "$NODE_ENV" == "development" ]; then + echo "Starting Talawa API in development mode..." + exec $TSX_PATH $DEV_PATH + elif [ "$NODE_ENV" == "production" ]; then + echo "Starting Talawa API in production mode..." + exec $TSX_PATH $PROD_PATH + else + echo "NODE_ENV is not set to a valid value. Please set it to 'development' or 'production'." + exit 1 + fi +} >> $LOG_FILE 2>&1 \ No newline at end of file diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service new file mode 100644 index 0000000000..57dc9425bd --- /dev/null +++ b/example/linux/systemd/talawa-api.service @@ -0,0 +1,39 @@ +[Unit] +# Description of the service +Description=Talawa-API Service + +# Ensure the service starts after the network is available +After=network.target + +[Service] +# The type of service. 'simple' means the service will start immediately. +Type=simple + +# The command to start the service. This points to the Talawa-api.sh script. +ExecStart=/home/purnendu/Development/talawa-api/example/linux/systemd/Talawa-api.sh + +# The working directory for the service. +WorkingDirectory=/home/purnendu/Development/talawa-api + +# Restart the service automatically if it stops. +Restart=always + +# The delay before restarting the service. +RestartSec=5 + +# The user to run the service as. You can find your username by running 'whoami'. +User=purnendu + +# The group to run the service as. Usually, this is the same as the username. +Group=purnendu + +# Redirects the output and error to the systemd journal and console. +StandardOutput=journal+console +StandardError=journal+console + +# Sets the maximum number of open files. +LimitNOFILE=65535 + +[Install] +# Specifies the target to which the service should be added. 'multi-user.target' means the service will start in multi-user mode. +WantedBy=multi-user.target \ No newline at end of file diff --git a/schema.graphql b/schema.graphql index 40fc5f2887..ba911b3ea4 100644 --- a/schema.graphql +++ b/schema.graphql @@ -83,6 +83,98 @@ The `BigInt` scalar type represents non-fractional signed whole numeric values. """ scalar BigInt +type Chat { + """URI to the avatar of the chat.""" + avatarURI: String + + """Date time at the time the chat was created.""" + createdAt: DateTime + + """User who created the chat.""" + creator: User + + """Custom information about the chat.""" + description: String + + """Global identifier of the chat.""" + id: ID! + + """ + GraphQL connection to traverse through the users that are members of the chat. + """ + members(after: String, before: String, first: Int, last: Int): ChatMembersConnection + + """ + GraphQL connection to traverse through the chat messages that are associated to the chat. + """ + messages(after: String, before: String, first: Int, last: Int): ChatMessagesConnection + + """Name of the chat.""" + name: String + + """Organization which the chat is associated to.""" + organization: Organization + + """Date time at the time the chat was last updated.""" + updatedAt: DateTime + + """User who last updated the chat.""" + updater: User +} + +"""""" +type ChatMembersConnection { + edges: [ChatMembersConnectionEdge] + pageInfo: PageInfo! +} + +"""""" +type ChatMembersConnectionEdge { + cursor: String! + node: User +} + +"""""" +enum ChatMembershipRole { + administrator + regular +} + +type ChatMessage { + """Body of the chat message.""" + body: String + + """Chat which the chat message belongs to.""" + chat: Chat + + """Date time at the time the chat message was created.""" + createdAt: DateTime + + """User who created the chat message.""" + creator: User + + """Global identifier of the chat message.""" + id: ID! + + """Parent chat message of the chat message.""" + parentChatMessage: ChatMessage + + """Date time at the time the chat message was last updated.""" + updatedAt: DateTime +} + +"""""" +type ChatMessagesConnection { + edges: [ChatMessagesConnectionEdge] + pageInfo: PageInfo! +} + +"""""" +type ChatMessagesConnectionEdge { + cursor: String! + node: ChatMessage +} + type Comment { """Body of the comment.""" body: String @@ -733,6 +825,15 @@ type Mutation { """Mutation field to create an advertisement.""" createAdvertisement(input: MutationCreateAdvertisementInput!): Advertisement + """Mutation field to create a chat.""" + createChat(input: MutationCreateChatInput!): Chat + + """Mutation field to create a chat membership.""" + createChatMembership(input: MutationCreateChatMembershipInput!): Chat + + """Mutation field to create a chat message.""" + createChatMessage(input: MutationCreateChatMessageInput!): ChatMessage + """Mutation field to create a comment.""" createComment(input: MutationCreateCommentInput!): Comment @@ -772,6 +873,15 @@ type Mutation { """Mutation field to delete an advertisement.""" deleteAdvertisement(input: MutationDeleteAdvertisementInput!): Advertisement + """Mutation field to delete a chat.""" + deleteChat(input: MutationDeleteChatInput!): Chat + + """Mutation field to delete a chat membership.""" + deleteChatMembership(input: MutationDeleteChatMembershipInput!): Chat + + """Mutation field to delete a chat message.""" + deleteChatMessage(input: MutationDeleteChatMessageInput!): ChatMessage + """Mutation field to delete a comment.""" deleteComment(input: MutationDeleteCommentInput!): Comment @@ -820,6 +930,15 @@ type Mutation { """Mutation field to update an advertisement.""" updateAdvertisement(input: MutationUpdateAdvertisementInput!): Advertisement + """Mutation field to update a chat.""" + updateChat(input: MutationUpdateChatInput!): Chat + + """Mutation field to update a chat membership.""" + updateChatMembership(input: MutationUpdateChatMembershipInput!): Chat + + """Mutation field to update a chat message.""" + updateChatMessage(input: MutationUpdateChatMessageInput!): ChatMessage + """Mutation field to update a comment.""" updateComment(input: MutationUpdateCommentInput!): Comment @@ -887,6 +1006,45 @@ input MutationCreateAdvertisementInput { type: AdvertisementType! } +"""""" +input MutationCreateChatInput { + """URI to the avatar of the chat.""" + avatarURI: String + + """Custom information about the chat.""" + description: String + + """Name of the chat.""" + name: String! + + """Global identifier of the associated organization.""" + organizationId: ID! +} + +"""""" +input MutationCreateChatMembershipInput { + """Global identifier of the associated chat.""" + chatId: ID! + + """Global identifier of the associated user.""" + memberId: ID! + + """Role assigned to the user within the chat.""" + role: ChatMembershipRole +} + +"""""" +input MutationCreateChatMessageInput { + """Body of the chat message.""" + body: String! + + """Global identifier of the associated chat.""" + chatId: ID! + + """Global identifier of the associated parent chat message.""" + parentChatMessageId: ID! +} + """""" input MutationCreateCommentInput { """Body of the comment.""" @@ -1106,6 +1264,27 @@ input MutationDeleteAdvertisementInput { id: ID! } +"""""" +input MutationDeleteChatInput { + """Global identifier of the chat.""" + id: ID! +} + +"""""" +input MutationDeleteChatMembershipInput { + """Global identifier of the associated chat.""" + chatId: ID! + + """Global identifier of the associated user.""" + memberId: ID! +} + +"""""" +input MutationDeleteChatMessageInput { + """Global identifier of the chat message.""" + id: ID! +} + """""" input MutationDeleteCommentInput { """Global identifier of the comment.""" @@ -1266,6 +1445,42 @@ input MutationUpdateAdvertisementInput { type: AdvertisementType } +"""""" +input MutationUpdateChatInput { + """URI to the avatar of the chat.""" + avatarURI: String + + """Custom information about the chat.""" + description: String + + """Global identifier of the chat.""" + id: ID! + + """Name of the chat.""" + name: String +} + +"""""" +input MutationUpdateChatMembershipInput { + """Global identifier of the associated chat.""" + chatId: ID! + + """Global identifier of the associated user.""" + memberId: ID! + + """Role assigned to the user within the chat.""" + role: ChatMembershipRole! +} + +"""""" +input MutationUpdateChatMessageInput { + """Body of the chat message.""" + body: String! + + """Global identifier of the chat message.""" + id: ID! +} + """""" input MutationUpdateCommentInput { """Body of the comment.""" @@ -1544,6 +1759,11 @@ type Organization { """URI to the avatar of the organization.""" avatarURI: String + """ + GraphQL connection to traverse through the chats that are associated to the organization. + """ + chats(after: String, before: String, first: Int, last: Int): OrganizationChatsConnection + """Name of the city where the organization exists in.""" city: String @@ -1621,6 +1841,18 @@ type OrganizationAdvertisementsConnectionEdge { node: Advertisement } +"""""" +type OrganizationChatsConnection { + edges: [OrganizationChatsConnectionEdge] + pageInfo: PageInfo! +} + +"""""" +type OrganizationChatsConnectionEdge { + cursor: String! + node: Chat +} + """""" type OrganizationFundsConnection { edges: [OrganizationFundsConnectionEdge] @@ -1822,6 +2054,12 @@ type Query { """Query field to read an advertisement.""" advertisement(input: QueryAdvertisementInput!): Advertisement + """Query field to read a chat.""" + chat(input: QueryChatInput!): Chat + + """Query field to read a chat message.""" + chatMessage(input: QueryChatMessageInput!): ChatMessage + """Query field to read a comment.""" comment(input: QueryCommentInput!): Comment @@ -1861,10 +2099,7 @@ type Query { tag(input: QueryTagInput!): Tag """Query field to read a user.""" - user( - """Input required to read a user.""" - input: QueryUserInput - ): User + user(input: QueryUserInput!): User } """""" @@ -1873,6 +2108,18 @@ input QueryAdvertisementInput { id: String! } +"""""" +input QueryChatInput { + """Global id of the chat.""" + id: String! +} + +"""""" +input QueryChatMessageInput { + """Global id of the chat message.""" + id: String! +} + """""" input QueryCommentInput { """Global id of the comment.""" @@ -1930,6 +2177,19 @@ input QueryUserInput { id: String! } +type Subscription { + """ + Subscription field to subscribe to the event of creation of a chat message. + """ + chatMessageCreate(input: SubscriptionChatMessageCreateInput!): ChatMessage +} + +"""""" +input SubscriptionChatMessageCreateInput { + """Global id of the chat.""" + id: String! +} + type Tag { """ GraphQL connection to traverse through the tags that have the tag as their parent tag. diff --git a/test/routes/graphql/gql.tada-cache.d.ts b/test/routes/graphql/gql.tada-cache.d.ts index 750efb9df7..1ed31434d2 100644 --- a/test/routes/graphql/gql.tada-cache.d.ts +++ b/test/routes/graphql/gql.tada-cache.d.ts @@ -5,30 +5,30 @@ import type { TadaDocumentNode, $tada } from 'gql.tada'; declare module 'gql.tada' { interface setupCache { "mutation Mutation_createUser($input: MutationCreateUserInput!) {\n createUser(input: $input){\n authenticationToken\n user {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber\n }\n }\n}": - TadaDocumentNode<{ createUser: { authenticationToken: string | null; user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; role: "administrator" | "regular"; postalCode?: string | null | undefined; password: string; natalSex?: "female" | "intersex" | "male" | null | undefined; name: string; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; isEmailAddressVerified: boolean; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress: string; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; + TadaDocumentNode<{ createUser: { authenticationToken: string | null; user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; role: "administrator" | "regular"; postalCode?: string | null | undefined; password: string; natalSex?: "female" | "intersex" | "male" | null | undefined; name: string; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; isEmailAddressVerified: boolean; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress: string; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; "mutation Mutation_deleteCurrentUser {\n deleteCurrentUser {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber \n }\n}": - TadaDocumentNode<{ deleteCurrentUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, {}, void>; + TadaDocumentNode<{ deleteCurrentUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, {}, void>; "mutation Mutation_deleteUser($input: MutationDeleteUserInput!) {\n deleteUser(input: $input) {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber \n }\n}": - TadaDocumentNode<{ deleteUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { id: string; }; }, void>; + TadaDocumentNode<{ deleteUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { id: string; }; }, void>; "mutation Mutation_signUp($input: MutationSignUpInput!) {\n signUp(input: $input) {\n authenticationToken\n user {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber\n }\n }\n}": - TadaDocumentNode<{ signUp: { authenticationToken: string | null; user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; password: string; natalSex?: "female" | "intersex" | "male" | null | undefined; name: string; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress: string; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; confirmedPassword: string; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; + TadaDocumentNode<{ signUp: { authenticationToken: string | null; user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; password: string; natalSex?: "female" | "intersex" | "male" | null | undefined; name: string; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress: string; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; confirmedPassword: string; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; "mutation Mutation_updateCurrentUser($input: MutationUpdateCurrentUserInput!) {\n updateCurrentUser(input: $input) {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber \n }\n}": - TadaDocumentNode<{ updateCurrentUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; password?: string | null | undefined; natalSex?: "female" | "intersex" | "male" | null | undefined; name?: string | null | undefined; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress?: string | null | undefined; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; + TadaDocumentNode<{ updateCurrentUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; postalCode?: string | null | undefined; password?: string | null | undefined; natalSex?: "female" | "intersex" | "male" | null | undefined; name?: string | null | undefined; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress?: string | null | undefined; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; "mutation Mutation_updateUser($input: MutationUpdateUserInput!) {\n updateUser(input: $input) {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber \n }\n}": - TadaDocumentNode<{ updateUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; role?: "administrator" | "regular" | null | undefined; postalCode?: string | null | undefined; password?: string | null | undefined; natalSex?: "female" | "intersex" | "male" | null | undefined; name?: string | null | undefined; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; isEmailAddressVerified?: boolean | null | undefined; id: string; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress?: string | null | undefined; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; + TadaDocumentNode<{ updateUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { workPhoneNumber?: string | null | undefined; state?: string | null | undefined; role?: "administrator" | "regular" | null | undefined; postalCode?: string | null | undefined; password?: string | null | undefined; natalSex?: "female" | "intersex" | "male" | null | undefined; name?: string | null | undefined; mobilePhoneNumber?: string | null | undefined; maritalStatus?: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null | undefined; isEmailAddressVerified?: boolean | null | undefined; id: string; homePhoneNumber?: string | null | undefined; employmentStatus?: "full_time" | "part_time" | "unemployed" | null | undefined; emailAddress?: string | null | undefined; educationGrade?: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null | undefined; description?: string | null | undefined; countryCode?: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null | undefined; city?: string | null | undefined; birthDate?: string | null | undefined; avatarURI?: string | null | undefined; address?: string | null | undefined; }; }, void>; "query Query_currentUser {\n currentUser {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber\n }\n}": - TadaDocumentNode<{ currentUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, {}, void>; + TadaDocumentNode<{ currentUser: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, {}, void>; "query Query_renewAuthenticationToken {\n renewAuthenticationToken\n}": TadaDocumentNode<{ renewAuthenticationToken: string | null; }, {}, void>; "query Query_signIn($input: QuerySignInInput!) {\n signIn(input: $input) {\n authenticationToken\n user {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber\n }\n }\n}": - TadaDocumentNode<{ signIn: { authenticationToken: string | null; user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { password: string; emailAddress: string; }; }, void>; + TadaDocumentNode<{ signIn: { authenticationToken: string | null; user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { password: string; emailAddress: string; }; }, void>; "query Query_user($input: QueryUserInput!) {\n user(input: $input) {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber\n }\n}": - TadaDocumentNode<{ user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { id: string; }; }, void>; + TadaDocumentNode<{ user: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; }, { input: { id: string; }; }, void>; "query Query_user_creator($input: QueryUserInput!) {\n user(input: $input) {\n creator {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber \n }\n }\n}": - TadaDocumentNode<{ user: { creator: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { id: string; }; }, void>; + TadaDocumentNode<{ user: { creator: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { id: string; }; }, void>; "query Query_user_updatedAt($input: QueryUserInput!) {\n user(input: $input) {\n updatedAt\n }\n}": TadaDocumentNode<{ user: { updatedAt: string | null; } | null; }, { input: { id: string; }; }, void>; "query Query_user_updater($input: QueryUserInput!) {\n user(input: $input) {\n updater {\n address\n avatarURI\n birthDate\n city\n countryCode\n createdAt\n description\n educationGrade\n emailAddress\n employmentStatus\n homePhoneNumber\n id\n isEmailAddressVerified\n maritalStatus\n mobilePhoneNumber\n name\n natalSex\n postalCode\n role\n state\n workPhoneNumber \n }\n }\n}": - TadaDocumentNode<{ user: { updater: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "pg" | "at" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { id: string; }; }, void>; + TadaDocumentNode<{ user: { updater: { address: string | null; avatarURI: string | null; birthDate: string | null; city: string | null; countryCode: "at" | "pg" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "ao" | "aq" | "ar" | "as" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "um" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "ye" | "yt" | "za" | "zm" | "zw" | null; createdAt: string | null; description: string | null; educationGrade: "kg" | "grade_1" | "grade_2" | "grade_3" | "grade_4" | "grade_5" | "grade_6" | "grade_7" | "grade_8" | "grade_9" | "grade_10" | "grade_11" | "grade_12" | "graduate" | "no_grade" | "pre_kg" | null; emailAddress: string | null; employmentStatus: "full_time" | "part_time" | "unemployed" | null; homePhoneNumber: string | null; id: string; isEmailAddressVerified: boolean | null; maritalStatus: "divorced" | "engaged" | "married" | "seperated" | "single" | "widowed" | null; mobilePhoneNumber: string | null; name: string | null; natalSex: "female" | "intersex" | "male" | null; postalCode: string | null; role: "administrator" | "regular" | null; state: string | null; workPhoneNumber: string | null; } | null; } | null; }, { input: { id: string; }; }, void>; } } From ead2e33b4dcd26f7d50400c110354455263309a6 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Fri, 27 Dec 2024 04:42:50 +0530 Subject: [PATCH 02/16] added installation.md and Created a script file --- test/routes/graphql/gql.tada.d.ts | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/test/routes/graphql/gql.tada.d.ts b/test/routes/graphql/gql.tada.d.ts index 6354209f1e..c33035f97c 100644 --- a/test/routes/graphql/gql.tada.d.ts +++ b/test/routes/graphql/gql.tada.d.ts @@ -10,6 +10,13 @@ export type introspection_types = { 'AuthenticationPayload': { kind: 'OBJECT'; name: 'AuthenticationPayload'; fields: { 'authenticationToken': { name: 'authenticationToken'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'BigInt': unknown; 'Boolean': unknown; + 'Chat': { kind: 'OBJECT'; name: 'Chat'; fields: { 'avatarURI': { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'members': { name: 'members'; type: { kind: 'OBJECT'; name: 'ChatMembersConnection'; ofType: null; } }; 'messages': { name: 'messages'; type: { kind: 'OBJECT'; name: 'ChatMessagesConnection'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; + 'ChatMembersConnection': { kind: 'OBJECT'; name: 'ChatMembersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'ChatMembersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'ChatMembersConnectionEdge': { kind: 'OBJECT'; name: 'ChatMembersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; + 'ChatMembershipRole': { name: 'ChatMembershipRole'; enumValues: 'administrator' | 'regular'; }; + 'ChatMessage': { kind: 'OBJECT'; name: 'ChatMessage'; fields: { 'body': { name: 'body'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chat': { name: 'chat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'parentChatMessage': { name: 'parentChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; }; }; + 'ChatMessagesConnection': { kind: 'OBJECT'; name: 'ChatMessagesConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'ChatMessagesConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'ChatMessagesConnectionEdge': { kind: 'OBJECT'; name: 'ChatMessagesConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; }; }; 'Comment': { kind: 'OBJECT'; name: 'Comment'; fields: { 'body': { name: 'body'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'downVoters': { name: 'downVoters'; type: { kind: 'OBJECT'; name: 'CommentDownVotersConnection'; ofType: null; } }; 'downVotesCount': { name: 'downVotesCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'post': { name: 'post'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'upVoters': { name: 'upVoters'; type: { kind: 'OBJECT'; name: 'CommentUpVotersConnection'; ofType: null; } }; 'upVotesCount': { name: 'upVotesCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'CommentDownVotersConnection': { kind: 'OBJECT'; name: 'CommentDownVotersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'CommentDownVotersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'CommentDownVotersConnectionEdge': { kind: 'OBJECT'; name: 'CommentDownVotersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; @@ -30,8 +37,11 @@ export type introspection_types = { 'Int': unknown; 'Iso3166Alpha2CountryCode': { name: 'Iso3166Alpha2CountryCode'; enumValues: 'ad' | 'ae' | 'af' | 'ag' | 'ai' | 'al' | 'am' | 'ao' | 'aq' | 'ar' | 'as' | 'at' | 'au' | 'aw' | 'ax' | 'az' | 'ba' | 'bb' | 'bd' | 'be' | 'bf' | 'bg' | 'bh' | 'bi' | 'bj' | 'bl' | 'bm' | 'bn' | 'bo' | 'bq' | 'br' | 'bs' | 'bt' | 'bv' | 'bw' | 'by' | 'bz' | 'ca' | 'cc' | 'cd' | 'cf' | 'cg' | 'ch' | 'ci' | 'ck' | 'cl' | 'cm' | 'cn' | 'co' | 'cr' | 'cu' | 'cv' | 'cw' | 'cx' | 'cy' | 'cz' | 'de' | 'dj' | 'dk' | 'dm' | 'do' | 'dz' | 'ec' | 'ee' | 'eg' | 'eh' | 'er' | 'es' | 'et' | 'fi' | 'fj' | 'fk' | 'fm' | 'fo' | 'fr' | 'ga' | 'gb' | 'gd' | 'ge' | 'gf' | 'gg' | 'gh' | 'gi' | 'gl' | 'gm' | 'gn' | 'gp' | 'gq' | 'gr' | 'gs' | 'gt' | 'gu' | 'gw' | 'gy' | 'hk' | 'hm' | 'hn' | 'hr' | 'ht' | 'hu' | 'id' | 'ie' | 'il' | 'im' | 'in' | 'io' | 'iq' | 'ir' | 'is' | 'it' | 'je' | 'jm' | 'jo' | 'jp' | 'ke' | 'kg' | 'kh' | 'ki' | 'km' | 'kn' | 'kp' | 'kr' | 'kw' | 'ky' | 'kz' | 'la' | 'lb' | 'lc' | 'li' | 'lk' | 'lr' | 'ls' | 'lt' | 'lu' | 'lv' | 'ly' | 'ma' | 'mc' | 'md' | 'me' | 'mf' | 'mg' | 'mh' | 'mk' | 'ml' | 'mm' | 'mn' | 'mo' | 'mp' | 'mq' | 'mr' | 'ms' | 'mt' | 'mu' | 'mv' | 'mw' | 'mx' | 'my' | 'mz' | 'na' | 'nc' | 'ne' | 'nf' | 'ng' | 'ni' | 'nl' | 'no' | 'np' | 'nr' | 'nu' | 'nz' | 'om' | 'pa' | 'pe' | 'pf' | 'pg' | 'ph' | 'pk' | 'pl' | 'pm' | 'pn' | 'pr' | 'ps' | 'pt' | 'pw' | 'py' | 'qa' | 're' | 'ro' | 'rs' | 'ru' | 'rw' | 'sa' | 'sb' | 'sc' | 'sd' | 'se' | 'sg' | 'sh' | 'si' | 'sj' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sr' | 'ss' | 'st' | 'sv' | 'sx' | 'sy' | 'sz' | 'tc' | 'td' | 'tf' | 'tg' | 'th' | 'tj' | 'tk' | 'tl' | 'tm' | 'tn' | 'to' | 'tr' | 'tt' | 'tv' | 'tw' | 'tz' | 'ua' | 'ug' | 'um' | 'us' | 'uy' | 'uz' | 'va' | 'vc' | 've' | 'vg' | 'vi' | 'vn' | 'vu' | 'wf' | 'ws' | 'ye' | 'yt' | 'za' | 'zm' | 'zw'; }; 'Iso4217CurrencyCode': { name: 'Iso4217CurrencyCode'; enumValues: 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWG'; }; - 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'createAdvertisement': { name: 'createAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'createComment': { name: 'createComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createCommentVote': { name: 'createCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createFund': { name: 'createFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'createFundCampaign': { name: 'createFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'createFundCampaignPledge': { name: 'createFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'createOrganization': { name: 'createOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createOrganizationMembership': { name: 'createOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createPost': { name: 'createPost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createPostVote': { name: 'createPostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createTag': { name: 'createTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'createUser': { name: 'createUser'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'deleteAdvertisement': { name: 'deleteAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'deleteComment': { name: 'deleteComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCommentVote': { name: 'deleteCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCurrentUser': { name: 'deleteCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'deleteFund': { name: 'deleteFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'deleteFundCampaign': { name: 'deleteFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'deleteFundCampaignPledge': { name: 'deleteFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'deleteOrganization': { name: 'deleteOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deleteOrganizationMembership': { name: 'deleteOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deletePost': { name: 'deletePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deletePostVote': { name: 'deletePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deleteTag': { name: 'deleteTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'deleteUser': { name: 'deleteUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'signUp': { name: 'signUp'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'updateAdvertisement': { name: 'updateAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'updateComment': { name: 'updateComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCommentVote': { name: 'updateCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCurrentUser': { name: 'updateCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'updateFund': { name: 'updateFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'updateFundCampaign': { name: 'updateFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'updateFundCampaignPledge': { name: 'updateFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'updateOrganization': { name: 'updateOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updateOrganizationMembership': { name: 'updateOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updatePost': { name: 'updatePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updatePostVote': { name: 'updatePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updateTag': { name: 'updateTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'updateUser': { name: 'updateUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; + 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'createAdvertisement': { name: 'createAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'createChat': { name: 'createChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createChatMembership': { name: 'createChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createChatMessage': { name: 'createChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'createComment': { name: 'createComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createCommentVote': { name: 'createCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createFund': { name: 'createFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'createFundCampaign': { name: 'createFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'createFundCampaignPledge': { name: 'createFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'createOrganization': { name: 'createOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createOrganizationMembership': { name: 'createOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createPost': { name: 'createPost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createPostVote': { name: 'createPostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createTag': { name: 'createTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'createUser': { name: 'createUser'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'deleteAdvertisement': { name: 'deleteAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'deleteChat': { name: 'deleteChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'deleteChatMembership': { name: 'deleteChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'deleteChatMessage': { name: 'deleteChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'deleteComment': { name: 'deleteComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCommentVote': { name: 'deleteCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCurrentUser': { name: 'deleteCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'deleteFund': { name: 'deleteFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'deleteFundCampaign': { name: 'deleteFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'deleteFundCampaignPledge': { name: 'deleteFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'deleteOrganization': { name: 'deleteOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deleteOrganizationMembership': { name: 'deleteOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deletePost': { name: 'deletePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deletePostVote': { name: 'deletePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deleteTag': { name: 'deleteTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'deleteUser': { name: 'deleteUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'signUp': { name: 'signUp'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'updateAdvertisement': { name: 'updateAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'updateChat': { name: 'updateChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'updateChatMembership': { name: 'updateChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'updateChatMessage': { name: 'updateChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'updateComment': { name: 'updateComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCommentVote': { name: 'updateCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCurrentUser': { name: 'updateCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'updateFund': { name: 'updateFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'updateFundCampaign': { name: 'updateFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'updateFundCampaignPledge': { name: 'updateFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'updateOrganization': { name: 'updateOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updateOrganizationMembership': { name: 'updateOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updatePost': { name: 'updatePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updatePostVote': { name: 'updatePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updateTag': { name: 'updateTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'updateUser': { name: 'updateUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'MutationCreateAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'attachments'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AdvertisementAttachmentInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'AdvertisementType'; ofType: null; }; }; defaultValue: null }]; }; + 'MutationCreateChatInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateChatInput'; isOneOf: false; inputFields: [{ name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; + 'MutationCreateChatMembershipInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateChatMembershipInput'; isOneOf: false; inputFields: [{ name: 'chatId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'memberId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'role'; type: { kind: 'ENUM'; name: 'ChatMembershipRole'; ofType: null; }; defaultValue: null }]; }; + 'MutationCreateChatMessageInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateChatMessageInput'; isOneOf: false; inputFields: [{ name: 'body'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'chatId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'parentChatMessageId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationCreateCommentInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateCommentInput'; isOneOf: false; inputFields: [{ name: 'body'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationCreateCommentVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateCommentVoteInput'; isOneOf: false; inputFields: [{ name: 'commentId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'CommentVoteType'; ofType: null; }; }; defaultValue: null }]; }; 'MutationCreateFundCampaignInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateFundCampaignInput'; isOneOf: false; inputFields: [{ name: 'currencyCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'Iso4217CurrencyCode'; ofType: null; }; }; defaultValue: null }, { name: 'endAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; }; defaultValue: null }, { name: 'fundId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'goalAmount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; }; defaultValue: null }]; }; @@ -44,6 +54,9 @@ export type introspection_types = { 'MutationCreateTagInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateTagInput'; isOneOf: false; inputFields: [{ name: 'isFolder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'parentTagId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }]; }; 'MutationCreateUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateUserInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'isEmailAddressVerified'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'role'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'UserRole'; ofType: null; }; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; 'MutationDeleteAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; + 'MutationDeleteChatInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteChatInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; + 'MutationDeleteChatMembershipInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteChatMembershipInput'; isOneOf: false; inputFields: [{ name: 'chatId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'memberId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; + 'MutationDeleteChatMessageInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteChatMessageInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationDeleteCommentInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteCommentInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationDeleteCommentVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteCommentVoteInput'; isOneOf: false; inputFields: [{ name: 'commentId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'creatorId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationDeleteFundCampaignInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteFundCampaignInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; @@ -57,6 +70,9 @@ export type introspection_types = { 'MutationDeleteUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteUserInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationSignUpInput': { kind: 'INPUT_OBJECT'; name: 'MutationSignUpInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'confirmedPassword'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'ENUM'; name: 'AdvertisementType'; ofType: null; }; defaultValue: null }]; }; + 'MutationUpdateChatInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateChatInput'; isOneOf: false; inputFields: [{ name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'MutationUpdateChatMembershipInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateChatMembershipInput'; isOneOf: false; inputFields: [{ name: 'chatId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'memberId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'role'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ChatMembershipRole'; ofType: null; }; }; defaultValue: null }]; }; + 'MutationUpdateChatMessageInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateChatMessageInput'; isOneOf: false; inputFields: [{ name: 'body'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateCommentInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCommentInput'; isOneOf: false; inputFields: [{ name: 'body'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateCommentVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCommentVoteInput'; isOneOf: false; inputFields: [{ name: 'commentId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'CommentVoteType'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateCurrentUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCurrentUserInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; @@ -69,9 +85,11 @@ export type introspection_types = { 'MutationUpdatePostVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdatePostVoteInput'; isOneOf: false; inputFields: [{ name: 'postId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'PostVoteType'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateTagInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateTagInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'parentTagId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateUserInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'isEmailAddressVerified'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'role'; type: { kind: 'ENUM'; name: 'UserRole'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; - 'Organization': { kind: 'OBJECT'; name: 'Organization'; fields: { 'address': { name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'advertisements': { name: 'advertisements'; type: { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnection'; ofType: null; } }; 'avatarURI': { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'city': { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'countryCode': { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'funds': { name: 'funds'; type: { kind: 'OBJECT'; name: 'OrganizationFundsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'members': { name: 'members'; type: { kind: 'OBJECT'; name: 'OrganizationMembersConnection'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'pinnedPosts': { name: 'pinnedPosts'; type: { kind: 'OBJECT'; name: 'OrganizationPinnedPostsConnection'; ofType: null; } }; 'pinnedPostsCount': { name: 'pinnedPostsCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'postalCode': { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'posts': { name: 'posts'; type: { kind: 'OBJECT'; name: 'OrganizationPostsConnection'; ofType: null; } }; 'postsCount': { name: 'postsCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'state': { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'tags': { name: 'tags'; type: { kind: 'OBJECT'; name: 'OrganizationTagsConnection'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; + 'Organization': { kind: 'OBJECT'; name: 'Organization'; fields: { 'address': { name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'advertisements': { name: 'advertisements'; type: { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnection'; ofType: null; } }; 'avatarURI': { name: 'avatarURI'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chats': { name: 'chats'; type: { kind: 'OBJECT'; name: 'OrganizationChatsConnection'; ofType: null; } }; 'city': { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'countryCode': { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'funds': { name: 'funds'; type: { kind: 'OBJECT'; name: 'OrganizationFundsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'members': { name: 'members'; type: { kind: 'OBJECT'; name: 'OrganizationMembersConnection'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'pinnedPosts': { name: 'pinnedPosts'; type: { kind: 'OBJECT'; name: 'OrganizationPinnedPostsConnection'; ofType: null; } }; 'pinnedPostsCount': { name: 'pinnedPostsCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'postalCode': { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'posts': { name: 'posts'; type: { kind: 'OBJECT'; name: 'OrganizationPostsConnection'; ofType: null; } }; 'postsCount': { name: 'postsCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'state': { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'tags': { name: 'tags'; type: { kind: 'OBJECT'; name: 'OrganizationTagsConnection'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'OrganizationAdvertisementsConnection': { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'OrganizationAdvertisementsConnectionEdge': { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; }; }; + 'OrganizationChatsConnection': { kind: 'OBJECT'; name: 'OrganizationChatsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'OrganizationChatsConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'OrganizationChatsConnectionEdge': { kind: 'OBJECT'; name: 'OrganizationChatsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; }; }; 'OrganizationFundsConnection': { kind: 'OBJECT'; name: 'OrganizationFundsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'OrganizationFundsConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'OrganizationFundsConnectionEdge': { kind: 'OBJECT'; name: 'OrganizationFundsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; }; }; 'OrganizationMembersConnection': { kind: 'OBJECT'; name: 'OrganizationMembersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'OrganizationMembersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; @@ -96,8 +114,10 @@ export type introspection_types = { 'PostUpVotersConnection': { kind: 'OBJECT'; name: 'PostUpVotersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'PostUpVotersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'PostUpVotersConnectionEdge': { kind: 'OBJECT'; name: 'PostUpVotersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'PostVoteType': { name: 'PostVoteType'; enumValues: 'down_vote' | 'up_vote'; }; - 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'advertisement': { name: 'advertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'comment': { name: 'comment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'currentUser': { name: 'currentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'fund': { name: 'fund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'fundCampaign': { name: 'fundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'fundCampaignPledge': { name: 'fundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'post': { name: 'post'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'renewAuthenticationToken': { name: 'renewAuthenticationToken'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'signIn': { name: 'signIn'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'tag': { name: 'tag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; + 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'advertisement': { name: 'advertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'chat': { name: 'chat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'chatMessage': { name: 'chatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'comment': { name: 'comment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'currentUser': { name: 'currentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'fund': { name: 'fund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'fundCampaign': { name: 'fundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'fundCampaignPledge': { name: 'fundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'post': { name: 'post'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'renewAuthenticationToken': { name: 'renewAuthenticationToken'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'signIn': { name: 'signIn'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'tag': { name: 'tag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'QueryAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'QueryAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; + 'QueryChatInput': { kind: 'INPUT_OBJECT'; name: 'QueryChatInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; + 'QueryChatMessageInput': { kind: 'INPUT_OBJECT'; name: 'QueryChatMessageInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryCommentInput': { kind: 'INPUT_OBJECT'; name: 'QueryCommentInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryFundCampaignInput': { kind: 'INPUT_OBJECT'; name: 'QueryFundCampaignInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryFundCampaignPledgeInput': { kind: 'INPUT_OBJECT'; name: 'QueryFundCampaignPledgeInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; @@ -108,6 +128,8 @@ export type introspection_types = { 'QueryTagInput': { kind: 'INPUT_OBJECT'; name: 'QueryTagInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryUserInput': { kind: 'INPUT_OBJECT'; name: 'QueryUserInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'String': unknown; + 'Subscription': { kind: 'OBJECT'; name: 'Subscription'; fields: { 'chatMessageCreate': { name: 'chatMessageCreate'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; }; }; + 'SubscriptionChatMessageCreateInput': { kind: 'INPUT_OBJECT'; name: 'SubscriptionChatMessageCreateInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'Tag': { kind: 'OBJECT'; name: 'Tag'; fields: { 'childTags': { name: 'childTags'; type: { kind: 'OBJECT'; name: 'TagChildTagsConnection'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'isFolder': { name: 'isFolder'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'parentTagFolder': { name: 'parentTagFolder'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'TagChildTagsConnection': { kind: 'OBJECT'; name: 'TagChildTagsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'TagChildTagsConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'TagChildTagsConnectionEdge': { kind: 'OBJECT'; name: 'TagChildTagsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; }; }; @@ -133,7 +155,7 @@ export type introspection = { name: never; query: 'Query'; mutation: 'Mutation'; - subscription: never; + subscription: 'Subscription'; types: introspection_types; }; From e607bf5eef26552a0ff01fff2de9ff760ac1bc49 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sat, 28 Dec 2024 02:32:18 +0530 Subject: [PATCH 03/16] resolved conversession --- example/linux/installation.md | 8 ++++++-- example/linux/systemd/Talawa-api.sh | 8 ++++---- example/linux/systemd/talawa-api.service | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index a527d7dde1..ddff85d0e2 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -27,6 +27,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv 4. **Edit the `Talawa-api.sh` Script**: - Edit the `Talawa-api.sh` script to set the project directory and log file path: + ```bash # Change to the project directory cd /home/purnendu/Development/talawa-api @@ -58,5 +59,8 @@ This guide provides step-by-step instructions for setting up the Talawa API serv 7. **Restart the Talawa API Service:**: sudo systemctl restart talawa-api.service -8. **Also u can see direct log stored in /talawa-api/example/linux/talawa-api.log :** - cat pathOfLogFile \ No newline at end of file +8. **Also, you can see direct log stored in /talawa-api/example/linux/talawa-api.log :** + cat pathOfLogFile + + + \ No newline at end of file diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index 196330a4d3..fec2c39074 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -14,16 +14,16 @@ DEV_PATH="src/index.ts" PROD_PATH="dist/index.js" # Change to the project directory .give your path -cd /home/purnendu/Development/talawa-api +cd /home/purnendu/Development/talawa-api || exit 1 # Load environment variables from .env file -export $(grep -v '^#' .env | xargs) +export "$(grep -v '^#' .env | xargs)" # Define log file give your path -LOG_FILE="/home/purnendu/Development/talawa-api/example/linux/talawa-api.log" +LOG_FILE="/var/log//talawa-api.log" # Ensure the log file exists -touch $LOG_FILE +sudo touch $LOG_FILE # Debugging: Output environment variables { diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 57dc9425bd..251b3ec013 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -32,7 +32,7 @@ StandardOutput=journal+console StandardError=journal+console # Sets the maximum number of open files. -LimitNOFILE=65535 +LimitNOFILE=1024 [Install] # Specifies the target to which the service should be added. 'multi-user.target' means the service will start in multi-user mode. From 80e448dcbdc34aaeeeb5ea371c272608e2de9c36 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sat, 28 Dec 2024 02:44:33 +0530 Subject: [PATCH 04/16] resolved conversation --- example/linux/installation.md | 8 ++++---- example/linux/systemd/Talawa-api.sh | 2 +- example/linux/systemd/talawa-api.service | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index ddff85d0e2..f1bd13834c 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -30,10 +30,10 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ```bash # Change to the project directory - cd /home/purnendu/Development/talawa-api + cd /usr/local/talawa-api # Define log file - LOG_FILE="/home/purnendu/Development/talawa-api/example/linux/talawa-api.log" + LOG_FILE="/var/log/talawa-api.log" ``` ## Commands to Follow in Sequence @@ -59,8 +59,8 @@ This guide provides step-by-step instructions for setting up the Talawa API serv 7. **Restart the Talawa API Service:**: sudo systemctl restart talawa-api.service -8. **Also, you can see direct log stored in /talawa-api/example/linux/talawa-api.log :** +8. **Also, you can see direct log stored in /talawa-api/example/linux/talawa-api.log :**: cat pathOfLogFile - + \ No newline at end of file diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index fec2c39074..eca072c7bb 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -14,7 +14,7 @@ DEV_PATH="src/index.ts" PROD_PATH="dist/index.js" # Change to the project directory .give your path -cd /home/purnendu/Development/talawa-api || exit 1 +cd /usr/local/talawa-api || exit 1 # Load environment variables from .env file export "$(grep -v '^#' .env | xargs)" diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 251b3ec013..783b3aadd0 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -10,10 +10,10 @@ After=network.target Type=simple # The command to start the service. This points to the Talawa-api.sh script. -ExecStart=/home/purnendu/Development/talawa-api/example/linux/systemd/Talawa-api.sh +ExecStart=/usr/local/talawa-api/example/linux/systemd/Talawa-api.sh # The working directory for the service. -WorkingDirectory=/home/purnendu/Development/talawa-api +WorkingDirectory=/usr/local/talawa-api # Restart the service automatically if it stops. Restart=always From 7411bda1d936742b3b14044c5c893273dcb596e7 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sat, 28 Dec 2024 03:34:57 +0530 Subject: [PATCH 05/16] solved unresolved comments --- example/linux/installation.md | 4 ++-- example/linux/systemd/Talawa-api.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index f1bd13834c..5de5df8c9f 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -59,8 +59,8 @@ This guide provides step-by-step instructions for setting up the Talawa API serv 7. **Restart the Talawa API Service:**: sudo systemctl restart talawa-api.service -8. **Also, you can see direct log stored in /talawa-api/example/linux/talawa-api.log :**: - cat pathOfLogFile +8. **Also, you can see direct log stored in /var/log/talawa-api.log :**: + sudo cat /var/log/talawa-api.log \ No newline at end of file diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index eca072c7bb..23c86db2fe 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -20,7 +20,7 @@ cd /usr/local/talawa-api || exit 1 export "$(grep -v '^#' .env | xargs)" # Define log file give your path -LOG_FILE="/var/log//talawa-api.log" +LOG_FILE="/var/log/talawa-api.log" # Ensure the log file exists sudo touch $LOG_FILE From 51b6ca7fc29cad4705975b3f1faae69bc39c879e Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sun, 29 Dec 2024 01:37:29 +0530 Subject: [PATCH 06/16] solved all unresolved conversation of CodeRabbit --- example/linux/installation.md | 199 +++++++++++++++++------ example/linux/systemd/Talawa-api.sh | 165 +++++++++++++++---- example/linux/systemd/talawa-api.service | 46 +++++- 3 files changed, 318 insertions(+), 92 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index 5de5df8c9f..35807eeb15 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -4,63 +4,154 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ## Prerequisites -- Node.js (version 20.18.0 or current version the app is running on) (Ensure the Linux Node.js version matches the app version) -- nvm (Node Version Manager) -- tsx (TypeScript execution environment should be installed globally. Command : npm install -g tsx ) -- A Linux system with systemd -- For development, first run manually to see if it is working. Check the `.env` file to ensure `NODE_ENV` is set to `development`. -- For production, first build the app to generate the `dist` folder, then set `NODE_ENV` to `production`. -- Ensure you provide the correct paths for each configuration to avoid errors. -- The service dynamically starts the development and production server based on the `.env` configuration, so verify it before making any changes. -- Always check the log files to identify errors. +- **fnm** (Fast Version Manager) +- **Node.js** (version specified in your Talawa API's `package.json`) +- **tsx** (TypeScript execution environment, install globally with `npm install -g tsx`) +- A Linux system with **systemd** +- **Root access** or `sudo` privileges for service installation +- **Dedicated system user** `talawa` for running the service (security best practice) +- **MongoDB** installed and running (required for Talawa API) +- **Redis** installed and running (required for Talawa API) +- Proper file permissions on `/usr/local/talawa-api` directory . Where your talawa-api is installed. +- For development: + - Ensure `.env` file sets `NODE_ENV=development`. + - Run the service manually to verify functionality. +- For production: + - Build the app to generate the `dist` folder. + - Ensure `.env` file sets `NODE_ENV=production`. +- **Log file setup**: + - Ensure a log file exists at `/var/log/talawa-api.log` with appropriate permissions and ownership. +- Verify Node.js version in your system matches the version required by `package.json`. +- Install `jq` for parsing JSON data (`sudo apt install jq` or equivalent). ## Steps -1. **Create the Systemd Service File**: - - Create a file named `talawa-api.service` in the `/etc/systemd/system` directory. Ensure you have root privileges. - -2. **Edit the `talawa-api.service` File**: - - Modify the `talawa-api.service` file as required (e.g., `ExecStart`, `WorkingDirectory`, `User`, `Group`). You can find how to edit these fields in the `talawa-api.service` file located in `example/linux/systemd`. - -3. **Copy the Configuration**: - - Copy the text into the `talawa-api.service` file located in `/etc/systemd/system` and save it. - -4. **Edit the `Talawa-api.sh` Script**: - - Edit the `Talawa-api.sh` script to set the project directory and log file path: - - ```bash - # Change to the project directory - cd /usr/local/talawa-api - - # Define log file - LOG_FILE="/var/log/talawa-api.log" - ``` - -## Commands to Follow in Sequence - -1. **Reload the Systemd Configuration**: +### 1. Create a Dedicated System User + +- Create a user named `talawa` for running the service: + ```bash + sudo adduser --system --no-create-home --group talawa + ``` +- Verify the user creation: + ```bash + id talawa + ``` + +### 2. Create the Systemd Service File + +- Create the `talawa-api.service` file in the `/etc/systemd/system/` directory with root privileges. +- Update the following placeholders with actual paths: + - `ExecStart` (path to your `Talawa-api.sh` script). + - `WorkingDirectory` (root directory of your Talawa API project). +- Refer to the example in `example/linux/systemd/talawa-api.service` for guidance. +- Copy talawa-api.service edit the path name then paste it inside `/etc/systemd/system/` +- Make sure `talawa-api.service` should be executable. + +### 3. Set Up the `Talawa-api.sh` Script + +- Edit the script to specify: + - **Project directory** (e.g., `/usr/local/talawa-api`) + - **Log file path** (e.g., `/var/log/talawa-api.log`) + - Ensure that the development (`src/index.ts`) and production (`dist/index.js`) paths are correctly set. + - Make sure `Talawa-api.sh` should be executable + +### 4. Configure the Environment + +- Ensure the `.env` file exists in the project directory and contains the appropriate configuration. +- Add the following environment variables: + - `NODE_ENV=development` or `NODE_ENV=production`. + +### 5. Verify Log File and Permissions + +- Create the log file if it does not exist: + ```bash + sudo touch /var/log/talawa-api.log + sudo chown talawa:talawa /var/log/talawa-api.log + sudo chmod 664 /var/log/talawa-api.log + ``` +- Ensure the log file owner matches the service user (e.g., `talawa`). + +### 6. Install Dependencies + +- Install required Node.js version with `fnm`: + ```bash + fnm install + fnm use + ``` + Replace `` with the version specified in `package.json` (`engines.node`). +- Install dependencies: + ```bash + npm install + ``` +- Globally install `tsx` if not already installed: + ```bash + npm install -g tsx + ``` +- Install `jq`: + ```bash + sudo apt install jq + ``` + +### 7. Enable and Start the Service + +1. Reload the systemd configuration: + ```bash sudo systemctl daemon-reload - -2. **Enable the Talawa API Service (required the first time):**: + ``` +2. Enable the service: + ```bash sudo systemctl enable talawa-api.service - -3. **Start the Talawa API Service:**: + ``` +3. Start the service: + ```bash sudo systemctl start talawa-api.service - -4. **Check the Status of the Talawa API Service:**: - sudo systemctl status talawa-api.service - -5. **View the Logs in Real-Time**: - sudo journalctl -u talawa-api.service -f - -6. **Stop the Talawa API Service:**: - sudo systemctl stop talawa-api.service - -7. **Restart the Talawa API Service:**: - sudo systemctl restart talawa-api.service - -8. **Also, you can see direct log stored in /var/log/talawa-api.log :**: - sudo cat /var/log/talawa-api.log - - - \ No newline at end of file + ``` + +### 8. Verify the Installation + +- Check the status of the service: + ```bash + sudo systemctl status talawa-api.service + ``` +- View logs in real-time: + ```bash + sudo journalctl -u talawa-api.service -f + ``` +- Check for errors: + ```bash + sudo journalctl -u talawa-api.service -p err + ``` +- Verify the service configuration: + ```bash + sudo systemd-analyze verify talawa-api.service + ``` +- Verify service dependencies: + ```bash + sudo systemctl list-dependencies talawa-api.service + ``` + +## Notes + +- Ensure the `Talawa-api.sh` script has executable permissions: + ```bash + chmod +x /path/to/Talawa-api.sh + ``` +- Adjust `LimitNOFILE` and security-related settings in the `talawa-api.service` file as needed for your environment. +- For production, ensure the `dist` folder exists by running: + ```bash + npm run build + ``` +- If you encounter any issues, refer to the logs in `/var/log/talawa-api.log` or use `journalctl`. + +### Additional Steps for Troubleshooting + +1. Verify Node.js and `tsx` installation: + ```bash + node -v + tsx -v + ``` +2. Ensure MongoDB and Redis are running: + ```bash + sudo systemctl status mongod + sudo systemctl status redis + ``` \ No newline at end of file diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index 23c86db2fe..ff8e6908d3 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -1,52 +1,157 @@ #!/bin/bash -# filepath: eg: /home/purnendu/Development/talawa-api/example/linux/systemd/Talawa-api.sh -# Load nvm and use the correct Node.js version -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -nvm use 20.18.0 +# Change to the project directory give your path +PROJECT_DIR="/home/purnendu/Development/talawa-api" +LOG_FILE="/var/log/talawa-api.log" +DEV_PATH="src/index.ts" +PROD_PATH="dist/index.js" + +# Check if the log file exists +if [ ! -f "$LOG_FILE" ]; then + echo "Error: Log file '$LOG_FILE' not found. Exiting." + echo "Please create it first with the correct ownership and permissions, then rerurn." + exit 1 +fi + +# Get the current user +CURRENT_USER=$(whoami) + +# Get the owner of the log file +LOG_FILE_OWNER=$(stat -c '%U' "$LOG_FILE") + +# Check if the current user matches the owner of the log file +if [ "$CURRENT_USER" != "$LOG_FILE_OWNER" ]; then + echo "Error: Current user '$CURRENT_USER' does not match the owner of the log file '$LOG_FILE_OWNER'. Exiting." + echo "Change ownership or permissions and try again." + exit 1 +fi + +# Check if the user has necessary permissions to read and write to the log file +if [ ! -w "$LOG_FILE" ] || [ ! -r "$LOG_FILE" ]; then + echo "Error: User '$CURRENT_USER' does not have sufficient permissions to read or write to the log file '$LOG_FILE'. Exiting." + echo "Change permissions and try again." + exit 1 +fi +echo "-------------------------------***************------------------------------------" | tee -a "$LOG_FILE" +echo "------------------------------>Talawa-API Logs<-----------------------------------" | tee -a "$LOG_FILE" +echo "------------------------------>Current session date: $(date)" | tee -a "$LOG_FILE" +echo "-------------------------------***************------------------------------------" | tee -a "$LOG_FILE" +echo "Log file '$LOG_FILE' is present and writable by user '$CURRENT_USER'. Proceeding..." | tee -a "$LOG_FILE" + +# Verify the project directory exists +if [ ! -d "$PROJECT_DIR" ]; then + echo "Error: Project directory '$PROJECT_DIR' not found. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi + +# Switch to the project directory +cd "$PROJECT_DIR" || { echo "Error: Failed to change to project directory '$PROJECT_DIR'. Exiting." | tee -a "$LOG_FILE"; exit 1; } + +echo "Changed to project directory '$PROJECT_DIR'. Proceeding..." | tee -a "$LOG_FILE" + +# Check for package.json in the current working directory +if [ ! -f "package.json" ]; then + echo "Error: 'package.json' not found in $(pwd). Exiting." | tee -a "$LOG_FILE" + echo "Please ensure it is present, then return." | tee -a "$LOG_FILE" + exit 1 +fi + +echo "package.json is present in $(pwd). Proceeding..." | tee -a "$LOG_FILE" + +if ! command -v jq >/dev/null 2>&1; then + echo "Error: 'jq' is not installed on this system. Exiting." | tee -a "$LOG_FILE" + echo "It is required to parse the Node.js version from package.json." | tee -a "$LOG_FILE" + echo "Please install 'jq' manually, then rerurn to the script." | tee -a "$LOG_FILE" + exit 1 +fi + +echo "'jq' is present. Proceeding..." | tee -a "$LOG_FILE" + +# Attempt to read the required Node.js version +TARGET_NODE_VERSION=$(jq -r '.engines.node' package.json 2>/dev/null) + +# Continue with your script... +if [ -z "$TARGET_NODE_VERSION" ] || [ "$TARGET_NODE_VERSION" == "null" ]; then + echo "Error: Unable to read 'engines.node' from package.json. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi + +# Remove 'v' prefix if present, e.g. "v20.18.0" -> "20.18.0" +INSTALLED_NODE_VERSION=$(node -v 2>/dev/null | sed 's/^v//') + +echo "Installed Node.js version: $INSTALLED_NODE_VERSION" | tee -a "$LOG_FILE" +echo "Target Node.js version: $TARGET_NODE_VERSION" | tee -a "$LOG_FILE" + +if [ "$INSTALLED_NODE_VERSION" != "$TARGET_NODE_VERSION" ]; then + echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting.| tee -a "$LOG_FILE" + echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version v$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" + exit 1 +fi + +echo "Node.js version matched. Proceeding..." | tee -a "$LOG_FILE" + +# Check if tsx is installed +if ! command -v tsx >/dev/null 2>&1; then + echo "Error: 'tsx' is not installed on this system. Exiting." | tee -a "$LOG_FILE" + echo "Please install 'tsx' manually, then rerun the script." | tee -a "$LOG_FILE" + exit 1 +fi # Define the path to the tsx executable dynamically TSX_PATH=$(which tsx) -# Define paths for development and production -DEV_PATH="src/index.ts" -PROD_PATH="dist/index.js" +# Check if the TSX_PATH is valid +if [ ! -x "$TSX_PATH" ]; then + echo "Error: Path for 'tsx' is not found or not executable. Verify it is properly installed. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi -# Change to the project directory .give your path -cd /usr/local/talawa-api || exit 1 +echo "'tsx' is installed and executable at '$TSX_PATH'. Proceeding..." | tee -a "$LOG_FILE" -# Load environment variables from .env file -export "$(grep -v '^#' .env | xargs)" +# Validate paths for development and production +if [ ! -f "$DEV_PATH" ]; then + echo "Error: Development path '$DEV_PATH' not found. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi -# Define log file give your path -LOG_FILE="/var/log/talawa-api.log" +if [ ! -f "$PROD_PATH" ]; then + echo "Error: Production path '$PROD_PATH' not found. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi -# Ensure the log file exists -sudo touch $LOG_FILE +echo "Development and production paths are valid. Proceeding..." | tee -a "$LOG_FILE" -# Debugging: Output environment variables -{ - echo "NODE_ENV is: $NODE_ENV" - echo "Starting directory is: $PWD" +# Check if .env file is present +if [ ! -f ".env" ]; then + echo "Error: '.env' file not found. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi +echo ".env file found in "$pwd" directory. Proceeding..." | tee -a "$LOG_FILE" - # Log the Node.js version - echo "Node.js version:" - node -v +# Load environment variables from .env file securely +while IFS= read -r line || [ -n "$line" ]; do + if [[ ! "$line" =~ ^# && "$line" =~ = ]]; then + export "$line" + fi +done < .env - # Log the current directory - echo "Current directory:" - pwd +# Check if NODE_ENV is set +if [ -z "$NODE_ENV" ]; then + echo "Error: Property 'NODE_ENV' is not present in the .env file. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi +echo "Environment variable 'NODE_ENV' is set to '$NODE_ENV'. Proceeding..." | tee -a "$LOG_FILE" +{ # Check the value of NODE_ENV and execute the corresponding command if [ "$NODE_ENV" == "development" ]; then - echo "Starting Talawa API in development mode..." + echo "Starting Talawa API in development mode..." | tee -a "$LOG_FILE" exec $TSX_PATH $DEV_PATH elif [ "$NODE_ENV" == "production" ]; then - echo "Starting Talawa API in production mode..." + echo "Starting Talawa API in production mode..." | tee -a "$LOG_FILE" exec $TSX_PATH $PROD_PATH else - echo "NODE_ENV is not set to a valid value. Please set it to 'development' or 'production'." + echo "NODE_ENV is not set to a valid value. Please set it to 'development' or 'production'. Exiting." | tee -a "$LOG_FILE" exit 1 fi -} >> $LOG_FILE 2>&1 \ No newline at end of file +} 2>&1 | tee -a "$LOG_FILE" \ No newline at end of file diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 783b3aadd0..2bc50fea31 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -9,10 +9,10 @@ After=network.target # The type of service. 'simple' means the service will start immediately. Type=simple -# The command to start the service. This points to the Talawa-api.sh script. +# The command to start the service. This points to the Talawa-api.sh script.User have to set it manually. Inside the talawa-api directory execute the command "pwd" to find the path.Then replace this with your original one (eg:/usr/local/talawa-api/example/linux/systemd/Talawa-api.sh -> /home/purnendu/development/talawa-api/example/linux/systemd/Talawa-api.sh) ExecStart=/usr/local/talawa-api/example/linux/systemd/Talawa-api.sh -# The working directory for the service. +# The working directory for the service.User have to set it manually.Inside the talawa-api directory execute the command "pwd" to find the path.Then replace this with your original one (eg:/usr/local/talawa-api -> /home/purnendu/development/talawa-api) WorkingDirectory=/usr/local/talawa-api # Restart the service automatically if it stops. @@ -21,19 +21,49 @@ Restart=always # The delay before restarting the service. RestartSec=5 -# The user to run the service as. You can find your username by running 'whoami'. -User=purnendu +# The user to run the service as. You can find your username by running 'whoami'.Create a user named talawa for better understanding and Security +User=talawa # The group to run the service as. Usually, this is the same as the username. -Group=purnendu +Group=talawa # Redirects the output and error to the systemd journal and console. StandardOutput=journal+console StandardError=journal+console -# Sets the maximum number of open files. -LimitNOFILE=1024 +# Sets the maximum number of open files.Neither too much nor too less. +LimitNOFILE=15000 + +# Security-related directives + +# Protect the system by making the root filesystem read-only for the service. +# This prevents the service from modifying system-critical files, reducing the attack surface. +ProtectSystem=strict + +# Prevent the service from accessing home directories of other users. +# Only the necessary files in the service's user directory will be accessible. +ProtectHome=yes + +# Make the service's working directory read-only. +# This is useful for protecting important directories from being altered by the service. +ReadOnlyPaths=/usr/local/talawa-api + +# Ensures the service and its child processes cannot gain new privileges. +# This helps to prevent privilege escalation attacks. +NoNewPrivileges=true + +# Isolate the service's temporary files from others by assigning it a private /tmp. +# This prevents other services or users from accessing or interfering with the service's temporary data. +PrivateTmp=true + +# Restrict the service to use only IPv4 and IPv6 address families. +# This helps prevent the service from using other network protocols, such as Unix domain sockets, which could be a potential attack vector. +RestrictAddressFamilies=AF_INET AF_INET6 + +# Allows the service to bind to network ports below 1024 (e.g., HTTP on port 80), +# but it won't allow the service to use any other privileged capabilities. +AmbientCapabilities=CAP_NET_BIND_SERVICE [Install] # Specifies the target to which the service should be added. 'multi-user.target' means the service will start in multi-user mode. -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target From b3b4dce938d26beedcc69a143799d4af34e9fbcf Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sun, 29 Dec 2024 02:06:24 +0530 Subject: [PATCH 07/16] again some suggestion resolved --- example/linux/systemd/Talawa-api.sh | 6 +++--- example/linux/systemd/talawa-api.service | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index ff8e6908d3..d64978a285 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -126,7 +126,7 @@ if [ ! -f ".env" ]; then echo "Error: '.env' file not found. Exiting." | tee -a "$LOG_FILE" exit 1 fi -echo ".env file found in "$pwd" directory. Proceeding..." | tee -a "$LOG_FILE" +echo ".env file found in $pwd directory. Proceeding..." | tee -a "$LOG_FILE" # Load environment variables from .env file securely while IFS= read -r line || [ -n "$line" ]; do @@ -146,10 +146,10 @@ echo "Environment variable 'NODE_ENV' is set to '$NODE_ENV'. Proceeding..." | te # Check the value of NODE_ENV and execute the corresponding command if [ "$NODE_ENV" == "development" ]; then echo "Starting Talawa API in development mode..." | tee -a "$LOG_FILE" - exec $TSX_PATH $DEV_PATH + exec "$TSX_PATH" "$DEV_PATH" elif [ "$NODE_ENV" == "production" ]; then echo "Starting Talawa API in production mode..." | tee -a "$LOG_FILE" - exec $TSX_PATH $PROD_PATH + exec "$TSX_PATH" "$PROD_PATH" else echo "NODE_ENV is not set to a valid value. Please set it to 'development' or 'production'. Exiting." | tee -a "$LOG_FILE" exit 1 diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 2bc50fea31..d3d595f61b 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -21,7 +21,7 @@ Restart=always # The delay before restarting the service. RestartSec=5 -# The user to run the service as. You can find your username by running 'whoami'.Create a user named talawa for better understanding and Security +# The user to run the service as. You can find your username by running 'whoami'.Create a user named `talawa` for better understanding and Security User=talawa # The group to run the service as. Usually, this is the same as the username. From 6bdd0058f71e50c4469313189a1ce38c1e434da4 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sun, 29 Dec 2024 07:46:15 +0530 Subject: [PATCH 08/16] some more unresolved conversation --- example/linux/installation.md | 53 +++++++++++++++++------- example/linux/systemd/Talawa-api.sh | 10 ++--- example/linux/systemd/talawa-api.service | 28 ++++++++----- 3 files changed, 60 insertions(+), 31 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index 35807eeb15..b0ba33f55f 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -12,7 +12,8 @@ This guide provides step-by-step instructions for setting up the Talawa API serv - **Dedicated system user** `talawa` for running the service (security best practice) - **MongoDB** installed and running (required for Talawa API) - **Redis** installed and running (required for Talawa API) -- Proper file permissions on `/usr/local/talawa-api` directory . Where your talawa-api is installed. +- Most important ! Add the working directory named `TALAWA_API_HOME` as global variable in `~/.bashrc`(eg.`export TALAWA_API_HOME="/path/to/your/talawa-api`) . Always give fallback sometimes it may not load. +- Proper file permissions on `/path/to/your/talawa-api` directory means `TALAWA_API_HOME` . Where your talawa-api is installed. - For development: - Ensure `.env` file sets `NODE_ENV=development`. - Run the service manually to verify functionality. @@ -26,7 +27,26 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ## Steps -### 1. Create a Dedicated System User +### 1. Make `TALAWA_API_HOME` Path as Environment variable + +- Find `/path/to/your/talawa-api` : + ```bash + pwd + ``` +- Add `export TALAWA_API_HOME="/path/to/your/talawa-api"` in the `~/.bashrc`(for bash users) file or `~/.zshrc`(for zsh users). You can use any text editor like (`nano,vim,emacs,vi`).This command will open the file then add `export TALAWA_API_HOME="/path/to/your/talawa-api"`: + ```bash + nano ~/.bashrc + ``` +- Refresh the shell to load the variable + ```bash + source ~/.bashrc + ``` +- Verify the Path: + ```bash + echo $TALAWA_API_HOME + ``` + +### 2. Create a Dedicated System User - Create a user named `talawa` for running the service: ```bash @@ -37,31 +57,32 @@ This guide provides step-by-step instructions for setting up the Talawa API serv id talawa ``` -### 2. Create the Systemd Service File +### 3. Create the Systemd Service File - Create the `talawa-api.service` file in the `/etc/systemd/system/` directory with root privileges. -- Update the following placeholders with actual paths: - - `ExecStart` (path to your `Talawa-api.sh` script). - - `WorkingDirectory` (root directory of your Talawa API project). -- Refer to the example in `example/linux/systemd/talawa-api.service` for guidance. -- Copy talawa-api.service edit the path name then paste it inside `/etc/systemd/system/` -- Make sure `talawa-api.service` should be executable. +- Cheack following placeholders: + - `ExecStart` (path to your `Talawa-api.sh` script. Means `/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh`). + - `WorkingDirectory` (root directory of your Talawa API project `/path/to/your/talawa-api`). +- Refer to the example in `/path/to/your/talawa-api/example/linux/systemd/talawa-api.service` for guidance. +- here you can't use `TALAWA_API_HOME` as global variables are not accessed by systemd so you have to manually add it. +- Copy talawa-api.service then paste it inside `/etc/systemd/system/` +- Make sure `talawa-api.service` should have owned by root. -### 3. Set Up the `Talawa-api.sh` Script +### 4. Set Up the `Talawa-api.sh` Script - Edit the script to specify: - - **Project directory** (e.g., `/usr/local/talawa-api`) + - **Project directory** (e.g., `/path/to/your/talawa-api/talawa-api` means `TALAWA_API_HOME`) - **Log file path** (e.g., `/var/log/talawa-api.log`) - Ensure that the development (`src/index.ts`) and production (`dist/index.js`) paths are correctly set. - Make sure `Talawa-api.sh` should be executable -### 4. Configure the Environment +### 5. Configure the Environment - Ensure the `.env` file exists in the project directory and contains the appropriate configuration. - Add the following environment variables: - `NODE_ENV=development` or `NODE_ENV=production`. -### 5. Verify Log File and Permissions +### 6. Verify Log File and Permissions - Create the log file if it does not exist: ```bash @@ -71,7 +92,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ``` - Ensure the log file owner matches the service user (e.g., `talawa`). -### 6. Install Dependencies +### 7. Install Dependencies - Install required Node.js version with `fnm`: ```bash @@ -92,7 +113,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo apt install jq ``` -### 7. Enable and Start the Service +### 8. Enable and Start the Service 1. Reload the systemd configuration: ```bash @@ -107,7 +128,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo systemctl start talawa-api.service ``` -### 8. Verify the Installation +### 9. Verify the Installation - Check the status of the service: ```bash diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index d64978a285..9b046bdd81 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -1,7 +1,7 @@ -#!/bin/bash +# Description: Talawa API startup script -# Change to the project directory give your path -PROJECT_DIR="/home/purnendu/Development/talawa-api" +# Use environment variable for project path, with a default fallback(eg./path/to/your/talawa-api replace with original path if TALAWA_API_HOME will not set then it will use default path.Important ! always use fallback path) +PROJECT_DIR="${TALAWA_API_HOME:-/path/to/your/talawa-api}" LOG_FILE="/var/log/talawa-api.log" DEV_PATH="src/index.ts" PROD_PATH="dist/index.js" @@ -126,11 +126,11 @@ if [ ! -f ".env" ]; then echo "Error: '.env' file not found. Exiting." | tee -a "$LOG_FILE" exit 1 fi -echo ".env file found in $pwd directory. Proceeding..." | tee -a "$LOG_FILE" +echo ".env file found in '$pwd' directory. Proceeding..." | tee -a "$LOG_FILE" # Load environment variables from .env file securely while IFS= read -r line || [ -n "$line" ]; do - if [[ ! "$line" =~ ^# && "$line" =~ = ]]; then + if [[ "$line" =~ ^NODE_ENV= ]]; then export "$line" fi done < .env diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index d3d595f61b..221edaf44c 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -9,11 +9,14 @@ After=network.target # The type of service. 'simple' means the service will start immediately. Type=simple -# The command to start the service. This points to the Talawa-api.sh script.User have to set it manually. Inside the talawa-api directory execute the command "pwd" to find the path.Then replace this with your original one (eg:/usr/local/talawa-api/example/linux/systemd/Talawa-api.sh -> /home/purnendu/development/talawa-api/example/linux/systemd/Talawa-api.sh) -ExecStart=/usr/local/talawa-api/example/linux/systemd/Talawa-api.sh +# Define the project directory directly in the service file +Environment="TALAWA_API_HOME=/path/to/your/talawa-api" -# The working directory for the service.User have to set it manually.Inside the talawa-api directory execute the command "pwd" to find the path.Then replace this with your original one (eg:/usr/local/talawa-api -> /home/purnendu/development/talawa-api) -WorkingDirectory=/usr/local/talawa-api +# The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it. +ExecStart="${TALAWA_API_HOME}/example/linux/systemd/Talawa-api.sh" + +# The working directory for the service.User have to export it. +WorkingDirectory=${TALAWA_API_HOME} # Restart the service automatically if it stops. Restart=always @@ -31,22 +34,27 @@ Group=talawa StandardOutput=journal+console StandardError=journal+console -# Sets the maximum number of open files.Neither too much nor too less. +# Sets the maximum number of open files. Adjust this value based on application requirements. +# The current value of 15000 was determined based on the following considerations: +# - Typical number of open files required by the application, including log files, database connections, and network sockets. +# - Monitoring of current usage patterns using tools like 'lsof'(lsof -p | wc -l) and 'ulimit'. +# - Allowing some buffer for peak usage scenarios. +# Users should monitor the application and adjust this value if the demands change in the future. LimitNOFILE=15000 # Security-related directives # Protect the system by making the root filesystem read-only for the service. -# This prevents the service from modifying system-critical files, reducing the attack surface. -ProtectSystem=strict +# This prevents the service from modifying system-critical files, reducing the attack surface.Comment this because for this line the service have no permission to write in logfile. +#ProtectSystem=strict # Prevent the service from accessing home directories of other users. -# Only the necessary files in the service's user directory will be accessible. -ProtectHome=yes +# Only the necessary files in the service's user directory will be accessible.For now don't use it as our script is under the talawa user's directories so if we execute then it will give error. +#ProtectHome=yes # Make the service's working directory read-only. # This is useful for protecting important directories from being altered by the service. -ReadOnlyPaths=/usr/local/talawa-api +ReadOnlyPaths=/path/to/your/talawa-api # Ensures the service and its child processes cannot gain new privileges. # This helps to prevent privilege escalation attacks. From b9da8887ed7ddc0e22a890759fd86ef44fcb3081 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sun, 29 Dec 2024 07:57:12 +0530 Subject: [PATCH 09/16] some suggestion --- example/linux/systemd/talawa-api.service | 3 --- 1 file changed, 3 deletions(-) diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 221edaf44c..846142e1f6 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -9,9 +9,6 @@ After=network.target # The type of service. 'simple' means the service will start immediately. Type=simple -# Define the project directory directly in the service file -Environment="TALAWA_API_HOME=/path/to/your/talawa-api" - # The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it. ExecStart="${TALAWA_API_HOME}/example/linux/systemd/Talawa-api.sh" From fb166f6073e610aa9c60aedce61b8e73e429ffac Mon Sep 17 00:00:00 2001 From: Purnendu Date: Sun, 29 Dec 2024 08:10:58 +0530 Subject: [PATCH 10/16] some changes --- example/linux/systemd/Talawa-api.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index 9b046bdd81..2aa5f4b3ec 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Description: Talawa API startup script # Use environment variable for project path, with a default fallback(eg./path/to/your/talawa-api replace with original path if TALAWA_API_HOME will not set then it will use default path.Important ! always use fallback path) @@ -129,11 +130,13 @@ fi echo ".env file found in '$pwd' directory. Proceeding..." | tee -a "$LOG_FILE" # Load environment variables from .env file securely -while IFS= read -r line || [ -n "$line" ]; do - if [[ "$line" =~ ^NODE_ENV= ]]; then - export "$line" - fi -done < .env +NODE_ENV=$(grep '^NODE_ENV=' .env | cut -d '=' -f2) +if [ -n "$NODE_ENV" ]; then + export NODE_ENV +else + echo "Error: NODE_ENV not found in .env file" | tee -a "$LOG_FILE" + exit 1 +fi # Check if NODE_ENV is set if [ -z "$NODE_ENV" ]; then From 42af787e6bce97ca7e2234b06a659a1cfa75fc39 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Mon, 30 Dec 2024 02:57:49 +0530 Subject: [PATCH 11/16] some unresolved conversation --- example/linux/installation.md | 90 ++++++++++-------------- example/linux/systemd/Talawa-api.sh | 6 +- example/linux/systemd/talawa-api.service | 8 +-- 3 files changed, 43 insertions(+), 61 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index b0ba33f55f..7debb49f50 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -4,7 +4,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ## Prerequisites -- **fnm** (Fast Version Manager) +- **fnm** (Fast Node Manager) - **Node.js** (version specified in your Talawa API's `package.json`) - **tsx** (TypeScript execution environment, install globally with `npm install -g tsx`) - A Linux system with **systemd** @@ -12,41 +12,21 @@ This guide provides step-by-step instructions for setting up the Talawa API serv - **Dedicated system user** `talawa` for running the service (security best practice) - **MongoDB** installed and running (required for Talawa API) - **Redis** installed and running (required for Talawa API) -- Most important ! Add the working directory named `TALAWA_API_HOME` as global variable in `~/.bashrc`(eg.`export TALAWA_API_HOME="/path/to/your/talawa-api`) . Always give fallback sometimes it may not load. -- Proper file permissions on `/path/to/your/talawa-api` directory means `TALAWA_API_HOME` . Where your talawa-api is installed. +- Proper file permissions on `/path/to/your/talawa-api` - For development: - - Ensure `.env` file sets `NODE_ENV=development`. - - Run the service manually to verify functionality. + - Ensure `.env` file sets `NODE_ENV=development` + - Run the service manually to verify functionality - For production: - - Build the app to generate the `dist` folder. - - Ensure `.env` file sets `NODE_ENV=production`. + - Build the app to generate the `dist` folder + - Ensure `.env` file sets `NODE_ENV=production` - **Log file setup**: - - Ensure a log file exists at `/var/log/talawa-api.log` with appropriate permissions and ownership. -- Verify Node.js version in your system matches the version required by `package.json`. -- Install `jq` for parsing JSON data (`sudo apt install jq` or equivalent). + - Ensure a log file exists at `/var/log/talawa-api.log` with appropriate permissions and ownership +- Verify Node.js version in your system matches the version required by `package.json` +- Install `jq` for parsing JSON data (`sudo apt install jq` or equivalent) ## Steps -### 1. Make `TALAWA_API_HOME` Path as Environment variable - -- Find `/path/to/your/talawa-api` : - ```bash - pwd - ``` -- Add `export TALAWA_API_HOME="/path/to/your/talawa-api"` in the `~/.bashrc`(for bash users) file or `~/.zshrc`(for zsh users). You can use any text editor like (`nano,vim,emacs,vi`).This command will open the file then add `export TALAWA_API_HOME="/path/to/your/talawa-api"`: - ```bash - nano ~/.bashrc - ``` -- Refresh the shell to load the variable - ```bash - source ~/.bashrc - ``` -- Verify the Path: - ```bash - echo $TALAWA_API_HOME - ``` - -### 2. Create a Dedicated System User +### 1. Create a Dedicated System User - Create a user named `talawa` for running the service: ```bash @@ -57,32 +37,33 @@ This guide provides step-by-step instructions for setting up the Talawa API serv id talawa ``` -### 3. Create the Systemd Service File +### 2. Create the Systemd Service File -- Create the `talawa-api.service` file in the `/etc/systemd/system/` directory with root privileges. -- Cheack following placeholders: - - `ExecStart` (path to your `Talawa-api.sh` script. Means `/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh`). - - `WorkingDirectory` (root directory of your Talawa API project `/path/to/your/talawa-api`). -- Refer to the example in `/path/to/your/talawa-api/example/linux/systemd/talawa-api.service` for guidance. -- here you can't use `TALAWA_API_HOME` as global variables are not accessed by systemd so you have to manually add it. -- Copy talawa-api.service then paste it inside `/etc/systemd/system/` -- Make sure `talawa-api.service` should have owned by root. +- Create the `talawa-api.service` file in the `/etc/systemd/system/` directory with root privileges +- Check following placeholders: + - `ExecStart` (path to your `Talawa-api.sh` script: `/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh`) + - `WorkingDirectory` (root directory of your Talawa API project: `/path/to/your/talawa-api`) + - `ReadOnlyPaths` (root directory of your Talawa API project: `/path/to/your/talawa-api`) + - `User, Group` (make sure to create user named `talawa`) +- Refer to the example in `/path/to/your/talawa-api/example/linux/systemd/talawa-api.service` for guidance +- Copy `talawa-api.service` then paste it inside `/etc/systemd/system/` +- Make sure `talawa-api.service` is owned by root -### 4. Set Up the `Talawa-api.sh` Script +### 3. Set Up the `Talawa-api.sh` Script - Edit the script to specify: - - **Project directory** (e.g., `/path/to/your/talawa-api/talawa-api` means `TALAWA_API_HOME`) + - **Project directory** (e.g., `/path/to/your/talawa-api/talawa-api`) - **Log file path** (e.g., `/var/log/talawa-api.log`) - - Ensure that the development (`src/index.ts`) and production (`dist/index.js`) paths are correctly set. - - Make sure `Talawa-api.sh` should be executable + - Ensure that the development (`src/index.ts`) and production (`dist/index.js`) paths are correctly set + - Make sure `Talawa-api.sh` is executable and owned by user `talawa`. Log file should also be owned by user `talawa` -### 5. Configure the Environment +### 4. Configure the Environment -- Ensure the `.env` file exists in the project directory and contains the appropriate configuration. +- Ensure the `.env` file exists in the project directory and contains the appropriate configuration - Add the following environment variables: - - `NODE_ENV=development` or `NODE_ENV=production`. + - `NODE_ENV=development` or `NODE_ENV=production` -### 6. Verify Log File and Permissions +### 5. Verify Log File and Permissions - Create the log file if it does not exist: ```bash @@ -90,16 +71,16 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo chown talawa:talawa /var/log/talawa-api.log sudo chmod 664 /var/log/talawa-api.log ``` -- Ensure the log file owner matches the service user (e.g., `talawa`). +- Ensure the log file owner matches the service user (e.g., `talawa`) -### 7. Install Dependencies +### 6. Install Dependencies - Install required Node.js version with `fnm`: ```bash fnm install fnm use ``` - Replace `` with the version specified in `package.json` (`engines.node`). + Replace `` with the version specified in `package.json` (`engines.node`) - Install dependencies: ```bash npm install @@ -113,7 +94,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo apt install jq ``` -### 8. Enable and Start the Service +### 7. Enable and Start the Service 1. Reload the systemd configuration: ```bash @@ -128,7 +109,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo systemctl start talawa-api.service ``` -### 9. Verify the Installation +### 8. Verify the Installation - Check the status of the service: ```bash @@ -157,12 +138,13 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ```bash chmod +x /path/to/Talawa-api.sh ``` -- Adjust `LimitNOFILE` and security-related settings in the `talawa-api.service` file as needed for your environment. +- Adjust `LimitNOFILE` and security-related settings in the `talawa-api.service` file as needed for your environment - For production, ensure the `dist` folder exists by running: ```bash npm run build ``` -- If you encounter any issues, refer to the logs in `/var/log/talawa-api.log` or use `journalctl`. +- If you encounter any issues, refer to the logs in `/var/log/talawa-api.log` or use `journalctl` +- Don't try to create a global variable to store paths for use in both systemd service and script files. Global variables (like `/path/to/your/talawa-api`) will not work properly as systemd services run in a separate environment. While there are various suggested solutions (using `/etc/environment`, `/etc/default/`, or `Environment` and `EnvironmentFile` directives), these approaches can complicate service execution and are not recommended ### Additional Steps for Troubleshooting diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index 2aa5f4b3ec..d42bac68a4 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -1,8 +1,8 @@ #!/bin/bash # Description: Talawa API startup script -# Use environment variable for project path, with a default fallback(eg./path/to/your/talawa-api replace with original path if TALAWA_API_HOME will not set then it will use default path.Important ! always use fallback path) -PROJECT_DIR="${TALAWA_API_HOME:-/path/to/your/talawa-api}" +# Don't use environment variables in this script, as when the script will run by systemd, it will not have access to the environment variables of the user.I have tried setting the environment variables in the systemd service file but it didn't work. So, directly use the absolute paths in the script.) +PROJECT_DIR="/path/to/your/talawa-api" LOG_FILE="/var/log/talawa-api.log" DEV_PATH="src/index.ts" PROD_PATH="dist/index.js" @@ -127,7 +127,7 @@ if [ ! -f ".env" ]; then echo "Error: '.env' file not found. Exiting." | tee -a "$LOG_FILE" exit 1 fi -echo ".env file found in '$pwd' directory. Proceeding..." | tee -a "$LOG_FILE" +echo ".env file found in '$(pwd)' directory. Proceeding..." | tee -a "$LOG_FILE" # Load environment variables from .env file securely NODE_ENV=$(grep '^NODE_ENV=' .env | cut -d '=' -f2) diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 846142e1f6..0293265d7b 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -9,11 +9,11 @@ After=network.target # The type of service. 'simple' means the service will start immediately. Type=simple -# The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it. -ExecStart="${TALAWA_API_HOME}/example/linux/systemd/Talawa-api.sh" +# The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it.Always use absolute path. +ExecStart="/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh" # The working directory for the service.User have to export it. -WorkingDirectory=${TALAWA_API_HOME} +WorkingDirectory=/path/to/your/talawa-api # Restart the service automatically if it stops. Restart=always @@ -21,7 +21,7 @@ Restart=always # The delay before restarting the service. RestartSec=5 -# The user to run the service as. You can find your username by running 'whoami'.Create a user named `talawa` for better understanding and Security +# The user to run the service as. You can find your username by running 'whoami'.Create a user named `talawa` for better understanding and Security.First create a user and group named 'talawa' for better Security. User=talawa # The group to run the service as. Usually, this is the same as the username. From f20cdc92784791de393d3c05cd2a87bc45a5dd5b Mon Sep 17 00:00:00 2001 From: Purnendu Date: Mon, 30 Dec 2024 03:20:29 +0530 Subject: [PATCH 12/16] some suggestion --- example/linux/installation.md | 4 ++-- example/linux/systemd/Talawa-api.sh | 4 ++-- example/linux/systemd/talawa-api.service | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index 7debb49f50..fd78d23b1f 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -28,7 +28,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 1. Create a Dedicated System User -- Create a user named `talawa` for running the service: +- Create a user named `talawa` for running the service(Don't confuse between `talawa` is user name and `talawa-api`is directory): ```bash sudo adduser --system --no-create-home --group talawa ``` @@ -157,4 +157,4 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ```bash sudo systemctl status mongod sudo systemctl status redis - ``` \ No newline at end of file + ``` diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index d42bac68a4..f511f30c98 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -10,7 +10,7 @@ PROD_PATH="dist/index.js" # Check if the log file exists if [ ! -f "$LOG_FILE" ]; then echo "Error: Log file '$LOG_FILE' not found. Exiting." - echo "Please create it first with the correct ownership and permissions, then rerurn." + echo "Please create it first with the correct ownership and permissions, then return." exit 1 fi @@ -84,7 +84,7 @@ echo "Installed Node.js version: $INSTALLED_NODE_VERSION" | tee -a "$LOG_FILE" echo "Target Node.js version: $TARGET_NODE_VERSION" | tee -a "$LOG_FILE" if [ "$INSTALLED_NODE_VERSION" != "$TARGET_NODE_VERSION" ]; then - echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting.| tee -a "$LOG_FILE" + echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting. | tee -a "$LOG_FILE" echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version v$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" exit 1 fi diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index 0293265d7b..fd69ba4956 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -10,7 +10,7 @@ After=network.target Type=simple # The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it.Always use absolute path. -ExecStart="/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh" +ExecStart=/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh # The working directory for the service.User have to export it. WorkingDirectory=/path/to/your/talawa-api From b86aff7872a2bf65419281cdb16445dbf254017a Mon Sep 17 00:00:00 2001 From: Purnendu Date: Mon, 30 Dec 2024 03:46:20 +0530 Subject: [PATCH 13/16] conversation resolved --- example/linux/installation.md | 2 +- example/linux/systemd/Talawa-api.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index fd78d23b1f..1073d83b9b 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -28,7 +28,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 1. Create a Dedicated System User -- Create a user named `talawa` for running the service(Don't confuse between `talawa` is user name and `talawa-api`is directory): +- Create a user named `talawa` for running the service(Note: `talawa` is the system user, whereas `talawa-api` refers to the directory.): ```bash sudo adduser --system --no-create-home --group talawa ``` diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index f511f30c98..cf792447d8 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -84,7 +84,7 @@ echo "Installed Node.js version: $INSTALLED_NODE_VERSION" | tee -a "$LOG_FILE" echo "Target Node.js version: $TARGET_NODE_VERSION" | tee -a "$LOG_FILE" if [ "$INSTALLED_NODE_VERSION" != "$TARGET_NODE_VERSION" ]; then - echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting. | tee -a "$LOG_FILE" + echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting." | tee -a "$LOG_FILE" echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version v$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" exit 1 fi From a11fb1ae462e774c628f233ccc4ca6cb0e8139d9 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Tue, 31 Dec 2024 00:44:38 +0530 Subject: [PATCH 14/16] added logrotate --- example/linux/installation.md | 46 +++++++++++++++++++++++++---- example/linux/systemd/Talawa-api.sh | 2 +- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index 1073d83b9b..af5efb1883 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -28,7 +28,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 1. Create a Dedicated System User -- Create a user named `talawa` for running the service(Note: `talawa` is the system user, whereas `talawa-api` refers to the directory.): +- Create a user named `talawa` for running the service: ```bash sudo adduser --system --no-create-home --group talawa ``` @@ -44,7 +44,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv - `ExecStart` (path to your `Talawa-api.sh` script: `/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh`) - `WorkingDirectory` (root directory of your Talawa API project: `/path/to/your/talawa-api`) - `ReadOnlyPaths` (root directory of your Talawa API project: `/path/to/your/talawa-api`) - - `User, Group` (make sure to create user named `talawa`) + - `User, Group` (use the `talawa` user and group created earlier) - Refer to the example in `/path/to/your/talawa-api/example/linux/systemd/talawa-api.service` for guidance - Copy `talawa-api.service` then paste it inside `/etc/systemd/system/` - Make sure `talawa-api.service` is owned by root @@ -73,7 +73,43 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ``` - Ensure the log file owner matches the service user (e.g., `talawa`) -### 6. Install Dependencies +### 6. Set Up Log Rotation + +- Create a new logrotate configuration file for Talawa API: + ```bash + sudo nano /etc/logrotate.d/talawa-api + ``` + +- Add the following configuration: + ```plaintext + /var/log/talawa-api.log { + su talawa talawa + weekly + rotate 4 + compress + missingok + notifempty + create 664 talawa talawa + postrotate + systemctl restart talawa-api.service > /dev/null 2>&1 || true + endscript + } + ``` + +- Verify logrotate setup: + ```bash + sudo logrotate -f /etc/logrotate.d/talawa-api + sudo logrotate -v /etc/logrotate.conf + sudo logrotate -d /etc/logrotate.conf + + ``` +- -f for forced rotation, -v for verbose rotation, -d for debuging mode rotation. +- To confirm log rotation, check the rotated logs: + ```bash + ls -la /var/log/talawa-api.log* + ``` + +### 7. Install Dependencies - Install required Node.js version with `fnm`: ```bash @@ -94,7 +130,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo apt install jq ``` -### 7. Enable and Start the Service +### 8. Enable and Start the Service 1. Reload the systemd configuration: ```bash @@ -109,7 +145,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv sudo systemctl start talawa-api.service ``` -### 8. Verify the Installation +### 9. Verify the Installation - Check the status of the service: ```bash diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index cf792447d8..1f3686f2e4 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -85,7 +85,7 @@ echo "Target Node.js version: $TARGET_NODE_VERSION" | tee -a "$LOG_FILE" if [ "$INSTALLED_NODE_VERSION" != "$TARGET_NODE_VERSION" ]; then echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting." | tee -a "$LOG_FILE" - echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version v$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" + echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version "$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" exit 1 fi From 117cc5e0156230430da8bdad772e313a23447e46 Mon Sep 17 00:00:00 2001 From: Purnendu Date: Tue, 31 Dec 2024 00:47:57 +0530 Subject: [PATCH 15/16] some suggestion --- example/linux/systemd/talawa-api.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/linux/systemd/talawa-api.service b/example/linux/systemd/talawa-api.service index fd69ba4956..13f2fa2d1e 100644 --- a/example/linux/systemd/talawa-api.service +++ b/example/linux/systemd/talawa-api.service @@ -9,7 +9,7 @@ After=network.target # The type of service. 'simple' means the service will start immediately. Type=simple -# The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it.Always use absolute path. +# The command to start the service. This points to the Talawa-api.sh script.Here you can't use any global variables as systemd will not load any variable. That's why we have to manually add it.Always use absolute path. ExecStart=/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh # The working directory for the service.User have to export it. From 828aefde57d0636167583a08d1051b3c4efb57ab Mon Sep 17 00:00:00 2001 From: Purnendu Date: Tue, 31 Dec 2024 01:10:12 +0530 Subject: [PATCH 16/16] add some security directives in log --- example/linux/installation.md | 31 ++++++++++++++++++++++++- example/linux/systemd/Talawa-api.sh | 35 +++++++++++++++-------------- 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/example/linux/installation.md b/example/linux/installation.md index af5efb1883..b74f73478c 100644 --- a/example/linux/installation.md +++ b/example/linux/installation.md @@ -29,10 +29,12 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 1. Create a Dedicated System User - Create a user named `talawa` for running the service: + ```bash sudo adduser --system --no-create-home --group talawa ``` - Verify the user creation: + ```bash id talawa ``` @@ -66,6 +68,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 5. Verify Log File and Permissions - Create the log file if it does not exist: + ```bash sudo touch /var/log/talawa-api.log sudo chown talawa:talawa /var/log/talawa-api.log @@ -76,6 +79,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 6. Set Up Log Rotation - Create a new logrotate configuration file for Talawa API: + ```bash sudo nano /etc/logrotate.d/talawa-api ``` @@ -90,6 +94,12 @@ This guide provides step-by-step instructions for setting up the Talawa API serv missingok notifempty create 664 talawa talawa + # Prevent symlink attacks + nolinkasym + # Delete old versions of log files + delaycompress + # Don't rotate empty log files + notifempty postrotate systemctl restart talawa-api.service > /dev/null 2>&1 || true endscript @@ -97,6 +107,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ``` - Verify logrotate setup: + ```bash sudo logrotate -f /etc/logrotate.d/talawa-api sudo logrotate -v /etc/logrotate.conf @@ -105,6 +116,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ``` - -f for forced rotation, -v for verbose rotation, -d for debuging mode rotation. - To confirm log rotation, check the rotated logs: + ```bash ls -la /var/log/talawa-api.log* ``` @@ -112,20 +124,24 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 7. Install Dependencies - Install required Node.js version with `fnm`: + ```bash fnm install fnm use ``` Replace `` with the version specified in `package.json` (`engines.node`) - Install dependencies: + ```bash npm install ``` - Globally install `tsx` if not already installed: + ```bash npm install -g tsx ``` - Install `jq`: + ```bash sudo apt install jq ``` @@ -133,14 +149,17 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 8. Enable and Start the Service 1. Reload the systemd configuration: + ```bash sudo systemctl daemon-reload ``` 2. Enable the service: + ```bash sudo systemctl enable talawa-api.service ``` 3. Start the service: + ```bash sudo systemctl start talawa-api.service ``` @@ -148,22 +167,27 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ### 9. Verify the Installation - Check the status of the service: + ```bash sudo systemctl status talawa-api.service ``` - View logs in real-time: + ```bash sudo journalctl -u talawa-api.service -f ``` - Check for errors: + ```bash sudo journalctl -u talawa-api.service -p err ``` - Verify the service configuration: + ```bash sudo systemd-analyze verify talawa-api.service ``` - Verify service dependencies: + ```bash sudo systemctl list-dependencies talawa-api.service ``` @@ -171,25 +195,30 @@ This guide provides step-by-step instructions for setting up the Talawa API serv ## Notes - Ensure the `Talawa-api.sh` script has executable permissions: + ```bash chmod +x /path/to/Talawa-api.sh ``` - Adjust `LimitNOFILE` and security-related settings in the `talawa-api.service` file as needed for your environment - For production, ensure the `dist` folder exists by running: + ```bash npm run build ``` - If you encounter any issues, refer to the logs in `/var/log/talawa-api.log` or use `journalctl` -- Don't try to create a global variable to store paths for use in both systemd service and script files. Global variables (like `/path/to/your/talawa-api`) will not work properly as systemd services run in a separate environment. While there are various suggested solutions (using `/etc/environment`, `/etc/default/`, or `Environment` and `EnvironmentFile` directives), these approaches can complicate service execution and are not recommended +- Don't try to create a global variable to store paths for use in both systemd service and script files. Global variables (like `/path/to/your/talawa-api`) will not work properly as systemd services run in a separate environment. While there are various suggested solutions (using `/etc/environment`, `/etc/default/`, or `Environment` and `EnvironmentFile` directives), these approaches can complicate service execution and are not recommended. +- While systemd supports environment variables through EnvironmentFile and Environment directives, using absolute paths in both the service file and script ensures consistent behavior across different environments and makes debugging easier. ### Additional Steps for Troubleshooting 1. Verify Node.js and `tsx` installation: + ```bash node -v tsx -v ``` 2. Ensure MongoDB and Redis are running: + ```bash sudo systemctl status mongod sudo systemctl status redis diff --git a/example/linux/systemd/Talawa-api.sh b/example/linux/systemd/Talawa-api.sh index 1f3686f2e4..9122557030 100755 --- a/example/linux/systemd/Talawa-api.sh +++ b/example/linux/systemd/Talawa-api.sh @@ -1,7 +1,8 @@ #!/bin/bash +# filepath: /path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh # Description: Talawa API startup script -# Don't use environment variables in this script, as when the script will run by systemd, it will not have access to the environment variables of the user.I have tried setting the environment variables in the systemd service file but it didn't work. So, directly use the absolute paths in the script.) +# Don't use environment variables in this script, as when the script will run by systemd, it will not have access to the environment variables of the user. I have tried setting the environment variables in the systemd service file but it didn't work. So, directly use the absolute paths in the script. PROJECT_DIR="/path/to/your/talawa-api" LOG_FILE="/var/log/talawa-api.log" DEV_PATH="src/index.ts" @@ -33,6 +34,7 @@ if [ ! -w "$LOG_FILE" ] || [ ! -r "$LOG_FILE" ]; then echo "Change permissions and try again." exit 1 fi + echo "-------------------------------***************------------------------------------" | tee -a "$LOG_FILE" echo "------------------------------>Talawa-API Logs<-----------------------------------" | tee -a "$LOG_FILE" echo "------------------------------>Current session date: $(date)" | tee -a "$LOG_FILE" @@ -62,7 +64,7 @@ echo "package.json is present in $(pwd). Proceeding..." | tee -a "$LOG_FILE" if ! command -v jq >/dev/null 2>&1; then echo "Error: 'jq' is not installed on this system. Exiting." | tee -a "$LOG_FILE" echo "It is required to parse the Node.js version from package.json." | tee -a "$LOG_FILE" - echo "Please install 'jq' manually, then rerurn to the script." | tee -a "$LOG_FILE" + echo "Please install 'jq' manually, then return to the script." | tee -a "$LOG_FILE" exit 1 fi @@ -84,8 +86,8 @@ echo "Installed Node.js version: $INSTALLED_NODE_VERSION" | tee -a "$LOG_FILE" echo "Target Node.js version: $TARGET_NODE_VERSION" | tee -a "$LOG_FILE" if [ "$INSTALLED_NODE_VERSION" != "$TARGET_NODE_VERSION" ]; then - echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting." | tee -a "$LOG_FILE" - echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version "$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" + echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION. Exiting." | tee -a "$LOG_FILE" + echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version v$TARGET_NODE_VERSION" | tee -a "$LOG_FILE" exit 1 fi @@ -145,16 +147,15 @@ if [ -z "$NODE_ENV" ]; then fi echo "Environment variable 'NODE_ENV' is set to '$NODE_ENV'. Proceeding..." | tee -a "$LOG_FILE" -{ - # Check the value of NODE_ENV and execute the corresponding command - if [ "$NODE_ENV" == "development" ]; then - echo "Starting Talawa API in development mode..." | tee -a "$LOG_FILE" - exec "$TSX_PATH" "$DEV_PATH" - elif [ "$NODE_ENV" == "production" ]; then - echo "Starting Talawa API in production mode..." | tee -a "$LOG_FILE" - exec "$TSX_PATH" "$PROD_PATH" - else - echo "NODE_ENV is not set to a valid value. Please set it to 'development' or 'production'. Exiting." | tee -a "$LOG_FILE" - exit 1 - fi -} 2>&1 | tee -a "$LOG_FILE" \ No newline at end of file + +# Check the value of NODE_ENV and execute the corresponding command +if [ "$NODE_ENV" == "development" ]; then + echo "Starting Talawa API in development mode..." | tee -a "$LOG_FILE" + exec "$TSX_PATH" "$DEV_PATH" +elif [ "$NODE_ENV" == "production" ]; then + echo "Starting Talawa API in production mode..." | tee -a "$LOG_FILE" + exec "$TSX_PATH" "$PROD_PATH" +else + echo "NODE_ENV is not set to a valid value. Please set it to 'development' or 'production'. Exiting." | tee -a "$LOG_FILE" + exit 1 +fi \ No newline at end of file