{"id":20680679,"url":"https://github.com/nilshartmann/spring-graphql-training","last_synced_at":"2025-04-22T09:55:50.453Z","repository":{"id":37428171,"uuid":"482022115","full_name":"nilshartmann/spring-graphql-training","owner":"nilshartmann","description":"\"Spring for GraphQL\" training","archived":false,"fork":false,"pushed_at":"2023-10-24T12:20:53.000Z","size":18188,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-13T19:12:53.919Z","etag":null,"topics":["graphql","graphql-java","graphql-server","java","spring-graphql"],"latest_commit_sha":null,"homepage":"https://graphql.schule","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilshartmann.png","metadata":{"files":{"readme":"README-gitpod.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-04-15T16:40:15.000Z","updated_at":"2025-01-12T20:02:48.000Z","dependencies_parsed_at":"2023-10-24T13:27:52.500Z","dependency_job_id":null,"html_url":"https://github.com/nilshartmann/spring-graphql-training","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilshartmann%2Fspring-graphql-training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilshartmann%2Fspring-graphql-training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilshartmann%2Fspring-graphql-training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilshartmann%2Fspring-graphql-training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilshartmann","download_url":"https://codeload.github.com/nilshartmann/spring-graphql-training/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250218699,"owners_count":21394366,"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":["graphql","graphql-java","graphql-server","java","spring-graphql"],"created_at":"2024-11-16T21:34:44.243Z","updated_at":"2025-04-22T09:55:50.397Z","avatar_url":"https://github.com/nilshartmann.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using the training workspace in GitPod\n\n[GitPod](https://www.gitpod.io) is a cloud service for development environments. Using GitPod you can\naccess the training workspace directly in your browser without the need to install anything. GitPod will create a personal (\"private\") workspace for you in the cloud, including a Java-enabled Web IDE (VS Code).\n\nUsing the GitPod service is free of charge (at least for the amount of resources you need for this\ntraining workspace).\n\n## Before you start\n\nBefore you open your own training workspace with GitPod in the cloud, please make sure:\n\n- You need a **GitHub** account to use GitPod. GitPod will use your GitHub account for authorization.\n- When opening the workspace GitPod tries to open at least one new browser tab. Make sure you allow gitpod to open this new tab. You can find more informations in the [GitPod docs on Browser Settings](https://www.gitpod.io/docs/configure/browser-settings).\n\n## Creating and opening the Workspace\n\nTo create your own workspace in the cloud, please click on the `Open in GitPod` button below.\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/nilshartmann/spring-graphql-training)\n\nAfter clicking the button, you will be asked to \"Continue with GitHub\" in order to login. Please click on the button and then (if asked for) enter your GitHub credentials.\n\n![Continue with GitHub](./gitpod-authorize-with-github.png)\n\nAfter login, GitPod asks you what IDE you want to use. I recommend to choose \"VS Code (Browser)\", as this is in my opionion the most stable option currently.\n\n\u003cimg src=\"./gitpod-vscode-select-ide.png\" width=\"350px\"/\u003e\n\nThen it might take some seconds until your workspace is created. Please stay tuned. And remember: GitPod will\nopen at least one additional browser tab, please allow this.\n\n### **Setting up VS Code**\n\n\u003e **Warning**\n\u003e When VS Code is starting in the browser, it also take some time until your project is completly imported into VS Code. During this time\n\u003e VS Code sometimes shows some messages about missing Java extensions and prompts you to install those extensions.\n\u003e **Please just ignore this pop-up dialogs**, all needed developer extensions are installed automatically. The popup dialogs are known problem in GitPod.\n\n\u003cimg src=\"./gitpod-vscode-dev-tools.png\" width=\"350px\"/\u003e\n\n\u003cimg src=\"./gitpod-vscode-dev-tools-02.png\" width=\"350px\"/\u003e\n\n\u003cimg src=\"./gitpod-vscode-dev-tools-03.png\" width=\"350px\"/\u003e\n\nFinally, VS Code will show the message **Projects are imported\ninto workspace**. Now your workspace is correctly started and\nsetup and you can start working with it! 😊\n\n\u003cimg src=\"./gitpod-vscode-dev-tools-04.png\" width=\"350px\"/\u003e\n\n## Using the workspace\n\n\u003cimg src=\"./gitpod-vscode.png\" width=\"450px\"/\u003e\n\nWhen GitPod has created your own workspace, it will open a VS Code editor instance in your browser with [Java support](https://code.visualstudio.com/docs/languages/java) installed. The Java Tooling\nis powered by JDT, that forms the base of the Eclipse IDE Java Tooling, so it's quite powerful.\n\nYou can browse around, make changes (it compiles automatically when you save a file using Ctrl/Cmd+S), everything as it would be your\nown, local workspace 😊. If you close the browser tab by accident, you can re-open the workspace simply by pressing the \"Open in GitPod\"-Button again.\n\nIn case you press the GitPod button and there is a workspace still running, you can deceide to re-open the running workspace\nor to create a fresh new one.\n\n\u003cimg src=\"./gitpod-reopen-workspace.png\" width=\"350px\"/\u003e\n\n## Services in the workspace\n\nThe training application consists of two \"services\" (Spring Boot Applications):\n\n- `UserService`: simple mock user service. Just let it run, we don't need to work on that service.\n- `PublyApplication` (or `Backend`). This is the central application we will work with in during the training.\n\nBoth services will be **compiled and started** automatically by Gitpod (see below) using Gradle.\n\n## Working with the PublyApplication source code\n\nYou can use VS Code's Java Support to make modification to the\nPublyApplication source code as you would do it locally.\nRemember: it's your personal workspace, only that it is not a local\none, but running the cloud.\n\nTo **open a file**, you can use the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) that can be opened using Ctrl+P/Cmd+P. When open, just type the name (or\nparts of it) of the file you want to open.\n\nInside the command palette, you can type a `#` followed by the name of a \"Symbol\" to open that symbol (class, method etc).\n\n![Open Symbol](./gitpod-vscode-open-symbol.png)\n\nWhen editing your source code, you can get **Code Completion** etc. The \"intellisense\" widget either opens itself automatically or can be\nopened using Ctrl+Space (as in most IDEs).\n\n![Code Completion](./gitpod-vscode-intellisense.png)\n\n### **IMPORTANT: Saving files (also: avoid unwanted loss of changes**)\n\n\u003e **Warning**\n\u003e Per default setting, this workspace' VS Code **DOES NOT SAVE YOUR FILES AUTOMATICALLY**! If you by accident\n\u003e close your browser tab, your changes are gone 😰\n\nIn my experience the Auto Save feature too often saves files, which in turn leads to lots of (unnecessary and\nunsuccesful) re-compilations.\n\nSo, please keep in mind that you regulary save your files (either Ctrl+S/Cmd+S or from file menu).\n\nIf you want the Auto Save feature back, you can enable it from the File menu.\n\n![](./gitpod-vscode-auto-save.png)\n\n### Creating new Java classes\n\nTo create a new Java class, simply right click on the package/folder\nthe new class should belong into and select \"New File\". Then enter the\nnew file/classname with `.java` suffix (for example `StoryDto.java`).\nThe file is then correctly created (with `package` and `class`) by\nVS Code for you.\n\n![Create new File](./gitpod-vscode-create-class.gif)\n\n### Compiling the changes\n\nAfter you made changes to your Java- or Resource-files,\nyou can press Ctrl+S/Cmd+S to save your file. Note that Ctrl+S/Cmd+S\nis bound to save the current file only. \"Save all\" is available\nfrom the file menu.\n\n![Open Application Menu](./gitpod-vscode-open-menu.png)\n\nWhen the file is saved, your application is recompiled automatically.\nThat is the behaviour known from the Eclipse IDE. (Actually\nEclipse' JDT is the base for VS Code's Java support).\n\nAfter your changed files have been compiled, the Publy Application\nshould restart automatically (thanks to the Spring Boot dev-tools).\nPlease have a look at the right tab in VS Code, where the `gradlew bootRun` process is running.\n\n![Gradle](./gitpod-vscode-gradle.png)\n\n### Running Publy Application from VS Code\n\nWhen you open your workspace, both services are started automatically\nfrom the command line using gradle.\n\nBut of course you can also start the Publy Spring Boot application also from VS Code. To do so, please quit both gradle processes for\nthe Publy Backend (Ctrl+C). Then open `PublyApplication.java`,\nhover with the mouse over the class name and choose either `Run`\nor `Debug`.\n\nWhen running the application from within VS Code, after compiling\nyour changes the app will be restarted automatically.\n\n![Run Publy from VS Code](./gitpod-vscode-run-app.png)\n\n## Using GraphiQL\n\nWhen the workspace starts and both services are up and runing, GraphiQL is opened in a new browser tab. If you close that window,\nyou can re-open it using the \"Remote Explorer\" in VS Code.\n\nPlease select the \"Remote Explorer\" in the \"Activity Bar\" on the left side, search for Port \"8090\" and click on \"Open in Browser\" on\nthe hover menu.\n\nGraphiQL then will be opened in a new browser tab.\n\n![Remote Explorer](./gitpod-remote-explorer.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilshartmann%2Fspring-graphql-training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilshartmann%2Fspring-graphql-training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilshartmann%2Fspring-graphql-training/lists"}