{"id":34976418,"url":"https://github.com/pvormste/task-gql-full-stack","last_synced_at":"2026-05-19T23:08:48.456Z","repository":{"id":45080698,"uuid":"438648670","full_name":"pvormste/task-gql-full-stack","owner":"pvormste","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-10T11:17:21.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T12:44:33.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/pvormste.png","metadata":{"files":{"readme":"README.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}},"created_at":"2021-12-15T13:56:51.000Z","updated_at":"2022-01-10T11:17:24.000Z","dependencies_parsed_at":"2022-09-03T06:31:40.369Z","dependency_job_id":null,"html_url":"https://github.com/pvormste/task-gql-full-stack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pvormste/task-gql-full-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Ftask-gql-full-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Ftask-gql-full-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Ftask-gql-full-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Ftask-gql-full-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvormste","download_url":"https://codeload.github.com/pvormste/task-gql-full-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Ftask-gql-full-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33236977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-12-27T00:13:44.963Z","updated_at":"2026-05-19T23:08:48.422Z","avatar_url":"https://github.com/pvormste.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL Full-Stack Task\n\n## Purpose\n - See if a code base can be understood and modified\n - See if task descriptions can be understood\n - Find out strengths and weaknesses\n - Try to tackle every task and find out where you struggled and why\n - Be honest to yourself\n\n## Backend\nThe Backend is written in Go and providing a GraphQL API. It uses following technologies:\n - [gqlgen](https://github.com/99designs/gqlgen)\n - [graphql-go-tools](https://github.com/jensneuse/graphql-go-tools)\n\nBefore starting this task, make sure you get a quick overview of GraphQL: https://graphql.org/learn/.\n\nCurrently all tests are failing and the goal will be to make them green again. For this, you will need to follow 3 tasks.\n\n\u003e Tests can be run using `go test ./...` command\n\nYou can also start the server manually and send queries to the graphql endpoint:\n\n```\ngo run server.go\ncurl --location --request POST 'localhost:8085/query' --header 'Content-Type: application/json' --data-raw '{\"query\":\"{ heroes { name } }\",\"variables\":{}}\ncurl --location --request POST 'localhost:8085/query' --header 'Content-Type: application/json' --data-raw '{\"query\":\"{ types }\",\"variables\":{}}'\n```\n\n### Task 1\n**The `heroes` query should return a hard-coded slice of Characters. See the test: https://github.com/pvormste/task-gql-full-stack/blob/main/server_test.go#L20**\n\nThose are the Characters that should be returned by the server:\n```\n[\n    {\n        \"name\": \"Luke Skywalker\",\n        \"hasLightsaver\": true\n    },\n    {\n        \"name\": \"Han Solo\",\n        \"hasLightsaver\": false\n    },\n    {\n        \"name\": \"C-3PO\",\n        \"primaryFunction\": \"Translator\"\n    }\n]   \n```\n*Hint:* Look at the gqlgen documentation to find the right place to add the missing code: https://gqlgen.com/getting-started/#implement-the-resolvers\n\n### Task 2\n**The `types` query should return only the name of so-called \"Object Types\" of the GraphQL schema. But there's currently a bug in the code and it is returning also the name of the interface.\n   (See the test: https://github.com/pvormste/task-gql-full-stack/blob/main/server_test.go#L29).**\n\nFix the implementation and make the tests related to this issue pass.\n\n*Hint:* Look inside the `schemaparser` package.\n\n### Task 3\n**For the third task you need to extend the GraphQL schema with 2 enums and their values. See the GraphQL documentation on how to add \nenums to a GraphQL schema: https://graphql.org/learn/schema/#enumeration-types**\n\nThe schema can be found in `graph/schema.graphqls`.\n\nFirst Enum:\n - Episode\n   - THE_PHANTOM_MENACE\n   - ATTACK_OF_THE_CLONES\n   - REVENGE_OF_THE_SITHS\n   - A_NEW_HOPE\n   - THE_EMPIRE_STRIKES_BACK\n   - RETURN_OF_THE_JEDI\n   - THE_FORCE_AWAKENS\n   - THE_LAST_JEDI\n   - THE_RISE_OF_SKYWALKER \n\n\nSecond Enum:\n - Side\n   - JEDI\n   - SITH\n\nIn the `schemaparser` package there is a function called `CountEnumValues`. The test for it is currently failing. Implement the package so that\nthe test turns green again.\n\n**How to approach this task:**\n - The `ast.Document` type from graphql-go-tools has `RootNodes` of type `ast.Node` which are being iterated over in the `visitor`. See: https://github.com/jensneuse/graphql-go-tools/blob/master/pkg/ast/ast.go#L12\n - A `ast.Node` has a `NodeKind` and a `ref` (index) to the specific slice of the `NodeKind`. See: https://github.com/jensneuse/graphql-go-tools/blob/master/pkg/ast/ast.go#L31\n - A `EnumTypeDefinition` has a `EnumValuesDefinitionList` See: https://github.com/jensneuse/graphql-go-tools/blob/master/pkg/ast/ast_enum_type_definition.go#L25\n\n\u003e **Info:** Changing the schema only won't change the behavior of the server! But it will be enough to make tests green.\n\n## Frontend\n\nThe FrontEnd is written in Javascript and uses following technologies:\n - [React](https://reactjs.org/)\n - [Jest](https://jestjs.io/)\n\n### Task 1 (Make all the tests green).\n\nCurrently one of the test is failing one FE, make the changes in the appropriate files to make all the test green.\n\n\u003e Tests can be run using `npm test` command \n\n\n### Task 2 (Add UI)\n\n- Use the currently available BE to render a [Graphiql](https://www.npmjs.com/package/graphiql) playground that helps query the graphql API.\n\n- Modify GraphiQL to add a button that toggles the view of newly added UI.\n\n- Add UI to render the JSON response received from BE.\n\nWireframe :\n\n\u003cimg src=\"./example/example.png\"\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvormste%2Ftask-gql-full-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvormste%2Ftask-gql-full-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvormste%2Ftask-gql-full-stack/lists"}