{"id":42494052,"url":"https://github.com/simplic/simplic-oxs","last_synced_at":"2026-01-28T12:36:21.769Z","repository":{"id":37087515,"uuid":"492022478","full_name":"simplic/simplic-oxs","owner":"simplic","description":"Contains the simplic OxS (Server) base","archived":false,"fork":false,"pushed_at":"2026-01-22T14:59:24.000Z","size":1075,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-23T03:50:45.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/simplic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-13T19:47:57.000Z","updated_at":"2026-01-22T15:00:54.000Z","dependencies_parsed_at":"2023-09-28T16:56:05.541Z","dependency_job_id":"a1075bcc-f14b-4623-a89b-d03f74247329","html_url":"https://github.com/simplic/simplic-oxs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simplic/simplic-oxs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplic%2Fsimplic-oxs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplic%2Fsimplic-oxs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplic%2Fsimplic-oxs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplic%2Fsimplic-oxs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplic","download_url":"https://codeload.github.com/simplic/simplic-oxs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplic%2Fsimplic-oxs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: 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":"2026-01-28T12:36:21.138Z","updated_at":"2026-01-28T12:36:21.762Z","avatar_url":"https://github.com/simplic.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simplic-oxs\n\n\n## Using GraphQL in Simplic.OxS modules\n\nTo use GraphQL you need to update your Simplic.OxS.Server to  **1.0.8922.1222 or higher** and follow these 3 steps.\n\n Create a class called **Query** inside your Server projects. An example for **workshops** would be as following\n ```cs\npublic class Query\n\t{\n\t\t[HotChocolate.AspNetCore.Authorization.AuthorizeAttribute]\n\t\t[UseProjection]\n\t\t[UseFiltering]\n\t\tpublic async Task\u003cIExecutable\u003cWorkshop\u003e\u003e GetWorkshops([Service] IWorkshopRepository workshopRepository)\n\t\t{\n\t\t\treturn await workshopRepository.GetCollection();\n\t\t}\n\t}\n```\nIn your Startup.cs inside the **Configure** method use following code snippet `services.UseGraphQL\u003cQuery\u003e();`\n\n In your Startup.cs inside the **MapHubs** method use following statement `builder.MapGraphQL();`\n\nNow you should be able to start your server and call ***/graphql** in your url.\nExample would be `https://localhost:7276/graphql/` \n\nYou can write now queries. \nExample : \n\n    query {\n\t  workshops {\n\t\tid\n\t\tcreateUserId\n\t\tkilometre\n\t\tplannedDate\n\t\toperatingHours\n\t\tvehicle {\n\t\t  id\n\t\t  matchCode\n\t\t}\n\t\titems{\n\t\t  workToDo\n\t\t  workDone\n\t\t  timeInMinutes\n\t\t  articles{\n\t\t\tid\n\t\t    name\n\t\t\tnumber\n\t\t\tquantity\n\t\t  }\n\t\t  tags{\n\t\t\tinternalName\n\t\t  }\n\t\t}\n\t  }\n\t}\n\n## Using GraphQL in Simplic.OxS modules with paging\nTo use paging in GraphQL you need to update your Simplic.OxS.Data to  **1.0.5423.417 or higher**, Simplic.OxS.Data.MongoDb to **1.0.4223.417 or higher** and Simplic.OxS.Server to **1.2.123.417 or higher**.\n\nUpdate the method in the class **Query**, in which you want to use paging.\nAn example for using paging **workshops** would be as following\n ```cs\npublic class Query\n\t{\n\t\t[HotChocolate.AspNetCore.Authorization.AuthorizeAttribute]\n\t\t[UsePaging]\n\t\t[UseProjection]\n\t\t[UseFiltering]\n\t\tpublic async Task\u003cIExecutable\u003cWorkshop\u003e\u003e GetWorkshops([Service] IWorkshopRepository workshopRepository)\n\t\t{\n\t\t\treturn await workshopRepository.GetCollection();\n\t\t}\n\t}\n```\n\nAlso you can use **UseOffsetPaging** instead of **UsePaging**.\n\nIt is important to keep the order.\u003cbr\u003e**Paging -\u003e Projection -\u003e Filtering**\n\nNow you can write a query with paging.\n\nAn example for cursor-based-paging:\n\n\tquery GetWorkshops($firstVar: Int!, $lastVar: Int!, $statusVar: String!) {\n  \t  workshops(\n    \tfirst: $firstVar\n    \tlast: $lastVar\n    \twhere: { status: { number: { eq: $statusVar } } }\n  \t  ) {\n    \tnodes {\n      \t  id\n      \t  createUserId\n      \t  kilometre\n      \t  plannedDate\n      \t  operatingHours\n      \t  vehicle {\n        \tid\n        \tmatchCode\n      \t  }\n          items {\n        \tworkToDo\n        \tworkDone\n        \ttimeInMinutes\n        \tarticles {\n          \t  id\n          \t  name\n          \t  number\n          \t  quantity\n        \t}\n        \ttags {\n          \t  internalName\n       \t\t}\n      \t  }\n      \t  status {\n            name\n      \t  }\n        }\n    \tpageInfo {\n      \t  hasNextPage\n      \t  hasPreviousPage\n\t\t  startCursor\n      \t  endCursor\n    \t}\n  \t  }\n\t}\n\nAlso you can use UseOffsetPaging instead of UsePaging.\n\nAn example for offset paging:\n\n\tquery GetWorkshops($skipVar: Int!, $takeVar: Int!, $statusVar: String!) {\n  \t  workshops(\n    \tskip: $skipVar\n    \ttake: $takeVar\n    \twhere: { status: { number: { eq: $statusVar } } }\n  \t  ) {\n    \titems {\n      \t  id\n      \t  createUserId\n      \t  kilometre\n      \t  plannedDate\n      \t  operatingHours\n      \t  vehicle {\n        \tid\n        \tmatchCode\n      \t  }\n          items {\n        \tworkToDo\n        \tworkDone\n        \ttimeInMinutes\n        \tarticles {\n          \t  id\n          \t  name\n          \t  number\n          \t  quantity\n        \t}\n        \ttags {\n          \t  internalName\n       \t\t}\n      \t  }\n      \t  status {\n            name\n      \t  }\n        }\n    \tpageInfo {\n      \t  hasNextPage\n      \t  hasPreviousPage\n    \t}\n  \t  }\n\t}\n\n\nWith a ? after a property you can define this property to nullable.\nBanana Cake pop display a error but its still work.\nIt is important to use this in querys when something can be null.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplic%2Fsimplic-oxs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplic%2Fsimplic-oxs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplic%2Fsimplic-oxs/lists"}