{"id":20008721,"url":"https://github.com/easygraphql/easygraphql-lt","last_synced_at":"2025-05-04T19:35:17.193Z","repository":{"id":52826597,"uuid":"178896405","full_name":"EasyGraphQL/easygraphql-lt","owner":"EasyGraphQL","description":"Do load testing to a GraphQL server without writing a single query. `$ npx easygraphql-lt \u003cCONFIG_FILE\u003e.json`","archived":false,"fork":false,"pushed_at":"2021-04-17T18:06:05.000Z","size":74,"stargazers_count":23,"open_issues_count":4,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-09T17:47:04.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EasyGraphQL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-01T15:49:10.000Z","updated_at":"2023-06-26T20:24:07.000Z","dependencies_parsed_at":"2022-08-17T15:45:34.557Z","dependency_job_id":null,"html_url":"https://github.com/EasyGraphQL/easygraphql-lt","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGraphQL%2Feasygraphql-lt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGraphQL%2Feasygraphql-lt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGraphQL%2Feasygraphql-lt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyGraphQL%2Feasygraphql-lt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EasyGraphQL","download_url":"https://codeload.github.com/EasyGraphQL/easygraphql-lt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224406135,"owners_count":17305725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T07:11:49.114Z","updated_at":"2024-11-13T07:11:49.798Z","avatar_url":"https://github.com/EasyGraphQL.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/EasyGraphQL/easygraphql-now/master/logo.png\" alt=\"easygraphql-lt \" width=\"350\"\u003e\n  \u003cbr\u003e\n    easygraphql-lt\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\neasygraphql-load-tester is the new version of [easygraphql-load-tester](https://github.com/EasyGraphQL/easygraphql-load-tester); \nnow the configuration is minimum, it only requires a `JSON` file. \n\nIt uses [Artillery.io](https://artillery.io/) under the hood.\n\n## How to run it:\n\nIf you want do download the latest version of the GraphQL schema, run this command with out flag\n```shell\n$ npx easygraphql-lt \u003cCONFIG_FILE\u003e.json\n```\n\nAlso, if you have a local copy of the schema to test, you can set the flag `--localSchema`\nand it'll display a list of files that might be the schema on the selected folder.\n```shell\n$ npx easygraphql-lt \u003cCONFIG_FILE\u003e.json --localSchema\n```\n\n## How to use it:\n\nCreate a JSON file that should have the next values:\n\n#### config:\n##### URL (Required)\nThe URL that is going to be used to do the load testing, it'll be used to get the latest copy\nof the GraphQL schema and to make all queries/mutations.\n\n```JSON\n\"url\": \"http://localhost:7000/\"\n```\n\n##### Name (Optional):\nThis will be the name that the test is going to have; this is optional if it's not set\nit will display the URL as the name.\n\n```JSON\n\"name\": \"Testing my new server\"\n```\n\n##### Selected queries (Optional)\nYou can select a list of the queries/mutations you want to test, to do this, you must create an\narray of strings with the name of the queries to test; this is optional if you don't\ncreate it, all the queries are going to be tested.\n\n```JSON\n\"selectedQueries\": [\"createUser\", \"searchUser\"]\n```\n\n#### Query file (Optional)\nYou can select if you want to save a `json` file with all the queries that were tested.\nIf you don't pass anything it is not going to be saved. The default value is `false`.\n\n```JSON\n\"queryFile\": true/false\n```\n\n#### Mutations (Optional)\nYou can use [`easygraphql-lt`](https://github.com/EasyGraphQL/easygraphql-lt) to test\nyour mutations as well; if you don't pass anything it is only going to test the queries. \nThe default value is `false`.\n*If you set `withMutations: true`, don't forget to add the input values on the args*\n\n```JSON\n\"withMutations\": true/false\n```\n\n#### Duration (Optional)\nYou can select the duration for your tests.\n\n```JSON\n\"duration\": 5\n```\n\n#### Arrival rate (Optional)\nYou can select the arrival rate for your tests.\n\n```JSON\n\"arrivalRate\": 10\n```\n\n#### Artillery output (Optional)\nYou can have a `JSON` file with the result of the load testing used with [Artillery.io](https://artillery.io/),\nat the end of the test the terminal is going to display a message explaining how to run this result. If it's not set it'll be\n`false` by default.\n\n```JSON\n\"withOutput\": true/false\n```\n\n#### Headers (Optional)\nSet additional HTTP attributes on the headers like `Authorization`or `Cookie`, etc...\n```JSON\n\"headers\": {\n  \"Authorization\": \"\u003cTOKEN\u003e\",\n  \"Cookie\": \"name=value; name2=value2;\"\n}\n```\n\n#### args\n\nHere you should set all the arguments that might be used on the load testing, and also if \n`withMutations` is `true`, you should put the values used on the `mutation`.\n\n**Note:** if you're going to use an array of string it should be created like this `\"[\\\"a\\\", \\\"b\\\"]\"`\n\n### JSON file example\n```json\n{\n  \"config\": {\n    \"url\": \"http://localhost:7000/\",\n    \"name\": \"Testing my new server\",\n    \"selectedQueries\": [\"createUser\", \"searchUser\"],\n    \"queryFile\": true,\n    \"withMutations\": true,\n    \"duration\": 5,\n    \"arrivalRate\": 10,\n    \"withOutput\": true,\n    \"headers\": {\n      \"Authorization\": \"\u003cTOKEN\u003e\",\n      \"Cookie\": \"name=value; name2=value2;\"\n    }\n  },\n  \"args\": {\n    \"getFamilyInfoByIsLocal\": {\n      \"isLocal\": true,\n      \"test\": \"[\\\"a\\\", \\\"b\\\"]\",\n      \"age\": 40,\n      \"name\": \"Demo Test\"\n    },\n    \"searchUser\": {\n      \"name\": \"Demo User\"\n    },\n    \"createUser\": {\n      \"name\": \"Demo User\"\n    },\n    \"createCity\": {\n      \"input\": {\n        \"name\": \"Demo Name\",\n        \"country\": \"Demo Country\"\n      }\n    }\n  }\n}\n```\n\n# License\n### The MIT License\n\nCopyright (c) 2019 EasyGraphQL\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasygraphql%2Feasygraphql-lt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasygraphql%2Feasygraphql-lt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasygraphql%2Feasygraphql-lt/lists"}