{"id":13694443,"url":"https://github.com/Dimillian/MortyUI","last_synced_at":"2025-05-03T03:31:43.810Z","repository":{"id":38347656,"uuid":"323366861","full_name":"Dimillian/MortyUI","owner":"Dimillian","description":"A very simple Rick \u0026 Morty app to demo GraphQL + SwiftUI","archived":false,"fork":false,"pushed_at":"2021-09-01T14:15:54.000Z","size":26287,"stargazers_count":470,"open_issues_count":2,"forks_count":53,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-11-09T20:43:44.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dimillian.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":"2020-12-21T14:56:42.000Z","updated_at":"2024-10-04T09:24:55.000Z","dependencies_parsed_at":"2022-08-09T03:01:20.119Z","dependency_job_id":null,"html_url":"https://github.com/Dimillian/MortyUI","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/Dimillian%2FMortyUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FMortyUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FMortyUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FMortyUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dimillian","download_url":"https://codeload.github.com/Dimillian/MortyUI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224352103,"owners_count":17297018,"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-08-02T17:01:32.173Z","updated_at":"2024-11-12T21:30:20.017Z","avatar_url":"https://github.com/Dimillian.png","language":"Swift","readme":"# MortyUI\nA very simple Rick \u0026 Morty app to demo GraphQL + SwiftUI\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCharacters\u003c/td\u003e\n    \u003ctd\u003eCharacter detail\u003c/td\u003e\n    \u003ctd\u003eEpisode\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"Screenshots/characters.png\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"Screenshots/character.png\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"Screenshots/episode.png\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n    \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"Screenshots/characters_dark.png\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"Screenshots/character_dark.png\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"Screenshots/episode_dark.png\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/table\u003e\n\n\nThis app have a very simple SwiftUI MVVM architecture. \n\nEach views have its own view model which consist of running a simple GraphQL query to fetch the necassary data. Once the data is set in the `@Published` property of the view model, the data will be displayed in the view. While it's fetching the data, it'll use the powerful SwiftUI `.redacted placeholder` modifier to display a beautiful loading state.\n\nAll the queries are in `Queries.graphql`. The file `API.swift` is generated at the build time using the `schema.json` of the GraphQL API of this awesome Rick \u0026 Morty API [website](https://rickandmortyapi.com/documentation/#episode-schema) and the `Queries.graphql` file using the [Apollo CLI](https://www.apollographql.com/docs/devtools/cli)\n\nFor now you can browse characters, episodes and locations (soon). Search is coming soon. \n\nTo not slow the build process, this project is coming with a Swift package command line tool to generate the swift code using the new Apollo Swift [scripting feature](https://www.apollographql.com/docs/ios/swift-scripting/). It can also download the schema from the Rick \u0026 Morty API. \n\nIt's not executed as part of the build process, if you modify the queries and wish to regenerate the API.swift file you'll need to:\n\n`cd Codegen `\n\n`swift run Codegen codegen`\n\nand to download the schema\n\n`swift run Codegen download`\n\n\nThis is all an excercice for me to play a bit with GraphQL + SwiftUI. Nothing very exciting on the UI side. The exiting part is that it's actually very little code (just the UI code + some GraphQL queries) to have the app working.\n","funding_links":[],"categories":["Swift","Misc"],"sub_categories":["SwiftUI","GraphQL"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDimillian%2FMortyUI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDimillian%2FMortyUI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDimillian%2FMortyUI/lists"}