{"id":13429488,"url":"https://github.com/mkmarek/graphql-dotnetcore","last_synced_at":"2025-03-16T03:31:38.395Z","repository":{"id":80606541,"uuid":"60928614","full_name":"mkmarek/graphql-dotnetcore","owner":"mkmarek","description":"GraphQL for .NET core based on https://github.com/graphql/graphql-js","archived":true,"fork":false,"pushed_at":"2019-01-13T14:24:33.000Z","size":734,"stargazers_count":100,"open_issues_count":2,"forks_count":11,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-27T07:32:18.774Z","etag":null,"topics":["api","csharp","dotnetcore","graphql"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkmarek.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-06-11T21:30:04.000Z","updated_at":"2024-07-04T19:21:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"20f758ac-54e8-4853-89f0-1a6bbe661515","html_url":"https://github.com/mkmarek/graphql-dotnetcore","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/mkmarek%2Fgraphql-dotnetcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkmarek%2Fgraphql-dotnetcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkmarek%2Fgraphql-dotnetcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkmarek%2Fgraphql-dotnetcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkmarek","download_url":"https://codeload.github.com/mkmarek/graphql-dotnetcore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822310,"owners_count":20353496,"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":["api","csharp","dotnetcore","graphql"],"created_at":"2024-07-31T02:00:40.500Z","updated_at":"2025-03-16T03:31:37.911Z","avatar_url":"https://github.com/mkmarek.png","language":"C#","funding_links":[],"categories":["Frameworks, Libraries and Tools","框架, 库和工具","API"],"sub_categories":["API"],"readme":"# ![](images/graphql-dotnetcore-logo.png)\nLibrary for creating GraphQL servers with .NET core.\n\n[![Build Status](https://travis-ci.org/mkmarek/graphql-dotnetcore.svg?branch=master)](https://travis-ci.org/mkmarek/graphql-dotnetcore)\n\u003cimg src=\"https://ci.appveyor.com/api/projects/status/8kqgx15riw51m05b?svg=true\"/\u003e\n[![Coverage Status](https://coveralls.io/repos/github/mkmarek/graphql-dotnetcore/badge.svg?branch=master)](https://coveralls.io/github/mkmarek/graphql-dotnetcore?branch=master)\n[![NuGet](https://img.shields.io/nuget/v/GraphQLCore.svg)](https://www.nuget.org/packages/GraphQLCore/)\n[![MyGet Pre Release](https://img.shields.io/myget/graphqlcore-ci/vpre/GraphQLCore.svg)](https://www.myget.org/feed/graphqlcore-ci/package/nuget/GraphQLCore)\n\n![](images/graphql-dotnetcore.png)\n\n## Code Example\n```csharp\npublic class Query : GraphQLObjectType\n{\n\tpublic Query() : base(\"Query\", \"Root query defintion\")\n\t{\n\t\tthis.Field(\"sum\", (int[] numbers) =\u003e numbers.Sum());\n\t}\n}\n\npublic class MyAwesomeSchema : GraphQLSchema\n{\n    public MyAwesomeSchema()\n    {\n        var rootQuery = new Query();\n        this.AddKnownType(rootQuery);\n        this.Query(rootQuery);\n    }\n}\n\n[Route(\"api/[controller]\")]\npublic class GraphQLController : Controller\n{\n    private MyAwesomeSchema schema = new MyAwesomeSchema();\n\n    [HttpPost]\n    public JsonResult Post(string query)\n    {\n        return this.Json(\n            new\n            {\n                data = this.schema.Execute(query)\n            }\n        );\n    }\n}\n```\n\n### Query\n\n```graphql\n{\n  sum(numbers: [1,2,3])\n}\n```\n\n### Result\n\n```json\n{\n  \"sum\" : 6\n}\n```\nInterested? Have a look on a better example [here](examples/GraphQLCore.GraphiQLExample)!\n\n## Documentation\n\n1. Scalar type translation\n2. Nullability\n3. [Untyped object definition](docs/untyped-object-definition/overview.md)\n\t- [Resolvers](docs/untyped-object-definition/overview.md#resolvers)\n4. [Typed object definition](docs/typed-object-definition/overview.md)\n\t- [Accessors](docs/typed-object-definition/overview.md#accessors)\n\t- [Resolvers](docs/typed-object-definition/overview.md#resolvers)\n5. [Interfaces](docs/interfaces/overview.md)\n    - [Accessors](docs/interfaces/overview.md#accessors)\n6. [Input object definition](docs/input-object-definition/overview.md)\n\t- [Accessors](docs/input-object-definition/overview.md#accessors)\n7. Schema\n    - Queries\n    - Mutations\n    - Subscriptions (TBD)\n    - Execution\n8. Introspection\n9. Validation\n10. Roadmap\n\n## Contributions\nWanna contribute? Awesome! Please follow this process to get your feature\nor bugfix in place.\n\n### Fork it\n![](images/fork.png)\n### Clone it\n```\ngit clone https://github.com/\u003cyour_username\u003e/graphql-dotnetcore.git\ncd graphql-dotnetcore\n```\n### Do it\n```\ngit checkout develop\n...\ngit add -A\ngit commit -m \"Awesome feature\"\n...\ngit add -A\ngit commit -m \"Fix awesome feature\"\n...\ngit add -A\ngit commit -m \"Fix the previous fix for awesome feature\"\n...\n```\n### Squash it\n```\ngit rebase -i \u003ccommit\u003e\n```\nMore info about squashing [http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).\n\n### Push it\n```\ngit push\n```\n\n### Request it\nThe final step will be creating a pull request. Refer the github docs\nfor more details about that [https://help.github.com/articles/using-pull-requests/](https://help.github.com/articles/using-pull-requests/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkmarek%2Fgraphql-dotnetcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkmarek%2Fgraphql-dotnetcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkmarek%2Fgraphql-dotnetcore/lists"}