{"id":20109999,"url":"https://github.com/wajid7511/graphqldemo","last_synced_at":"2026-04-13T05:49:07.340Z","repository":{"id":112927508,"uuid":"593356846","full_name":"wajid7511/GraphQlDemo","owner":"wajid7511","description":"Built a GraphQL API with ASP.NET Core and HotChocolate, focusing on SQL database integration and code-first schema design. Implemented CRUD operations, pagination, and AutoMapper. Managed EF Core migrations and conducted unit tests with MSTest. Created detailed API documentation and Readme","archived":false,"fork":false,"pushed_at":"2025-08-09T17:18:12.000Z","size":4911,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2026-01-03T22:18:43.560Z","etag":null,"topics":["automapper","code-first-approach","docker","entity-framework-core","graphql","graphql-api","hotchocolate","mongodb","netcore","producer","rabbitmq","rabbitmq-consumer","sql","unittesting","webapi","worker-service"],"latest_commit_sha":null,"homepage":"","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/wajid7511.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":"2023-01-25T20:16:06.000Z","updated_at":"2025-08-09T17:18:15.000Z","dependencies_parsed_at":"2024-08-09T20:43:04.015Z","dependency_job_id":"d87e8da2-d328-464c-9571-46d0d15abe0e","html_url":"https://github.com/wajid7511/GraphQlDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wajid7511/GraphQlDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajid7511%2FGraphQlDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajid7511%2FGraphQlDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajid7511%2FGraphQlDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajid7511%2FGraphQlDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wajid7511","download_url":"https://codeload.github.com/wajid7511/GraphQlDemo/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajid7511%2FGraphQlDemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31741541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T05:13:27.074Z","status":"ssl_error","status_checked_at":"2026-04-13T05:13:25.150Z","response_time":93,"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":["automapper","code-first-approach","docker","entity-framework-core","graphql","graphql-api","hotchocolate","mongodb","netcore","producer","rabbitmq","rabbitmq-consumer","sql","unittesting","webapi","worker-service"],"created_at":"2024-11-13T18:10:04.950Z","updated_at":"2026-04-13T05:49:07.296Z","avatar_url":"https://github.com/wajid7511.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL API with ASP.NET Core and HotChocolate\n\n## Overview\n\nThis project demonstrates the implementation of a GraphQL API using ASP.NET Core and HotChocolate, with a SQL \u0026 Mongo database backend. The project employs a Code First approach to define the GraphQL schema and uses AutoMapper to map database entities to the GraphQL schema.\n\n## Features\n\n- **GraphQL HotChocolate**: Provides a powerful and flexible GraphQL server implementation.\n- **ASP.NET Core**: Serves as the web framework for building the API.\n- **SQL Database**: Stores data for groceries and products.\n- **AutoMapper**: Maps database entities to GraphQL schema models.\n- **Code First Approach**: Defines GraphQL schema based on C# classes.\n\n## GraphQL Schema\n\n### Mutations\n\n1. **AddGrocery**\n   - Adds a new grocery to the database.\n   - Input: `GroceryInput` type.\n   - Output: `GrocerySchema` type.\n\n2. **AddProducts**\n   - Adds a product to a specified grocery.\n   - Input: `ProductInput` type.\n   - Output: `ProductSchema` type.\n\n3. **AddCustomer**\n  - Adds a Customer .\n  - Input: `CustomerInput` type.\n  - Output: `CustomerSchema` type.\n\n### Queries\n\n1. **GetProducts**\n   - Retrieves a list of products with pagination support.\n   - Output: List of `ProductSchema` types.\n   - Pagination: Uses `UseOffsetPaging` to handle page navigation with `pageInfo` that includes `hasNextPage` and `hasPreviousPage`.\n\n2. **GetGroceries**\n   - Retrieves a list of groceries with pagination support.\n   - Output: List of `GrocerySchema` types.\n   - Pagination: Uses `UseOffsetPaging` to handle page navigation with `pageInfo` that includes `hasNextPage` and `hasPreviousPage`.\n\n\n3. **GetCustomers**\n   - Retrieves a list of customers with pagination support.\n   - Output: List of `CustomerSchema` types.\n   - Pagination: Uses `UseOffsetPaging` to handle page navigation with `pageInfo` that includes `hasNextPage` and `hasPreviousPage`.\n\n## Installation\n\n1. **Clone the Repository**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd \u003cproject-directory\u003e\n2. **Restore Dependencies**\n\n      ```bash \n      dotnet restore\n      ```\n3. **Configuration**\nDatabase Connection: Ensure your SQL and mongo database connection string is correctly configured in appsettings.json or appsettings.development.json.\n \n   **Note** Open Terminal should be open GraphQlDemo folder not Project \n\n   1.  **Add Migration** \"nameof Migration Replace with migration name\" \n           ```bash\n           dotnet ef migrations add PriceInProduct --context GraphQlDatabaseContext --output-dir Migrations --project Data/Database/GraphQl.Database.csproj```\n   2. **Update Database**\n        ```bash\n        dotnet ef database update --startup-project GraphQlDemo```\n4. **Run Application**\n      ```bash  \n      dotnet run\n      ```\n5. **Usage**\nOpen your browser and navigate to https://localhost:7104/graphql/ to interact with the GraphQL API. \nUse the GraphQL Playground or any GraphQL client to execute queries and mutations.\n\n## Queries and Result Screenshots\nYou can find the example query and Screenshots in Queries_Result Folder\n\n## Contribution\nFeel free to fork the repository and submit pull requests with improvements or new features.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Contact\nFor any questions or feedback, please contact email2wajidkhan@gmail.com, Phone Number: +971566290465.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwajid7511%2Fgraphqldemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwajid7511%2Fgraphqldemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwajid7511%2Fgraphqldemo/lists"}