All Projects → rivantsov → ngraphql

rivantsov / ngraphql

Licence: MIT license
GraphQL .NET Server and Client

Programming Languages

C#
18002 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to ngraphql

Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (+596.15%)
Mutual labels:  graphql-server, graphql-api
Rails Devise Graphql
A Rails 6 boilerplate to create your next Saas product. Preloaded with graphQL, devise, JWT, CanCanCan, RailsAdmin, Rubocop, Rspec, i18n and more.
Stars: ✭ 199 (+665.38%)
Mutual labels:  graphql-server, graphql-api
Gqlify
[NOT MAINTAINED]An API integration framework using GraphQL
Stars: ✭ 182 (+600%)
Mutual labels:  graphql-server, graphql-api
Hangzhou Graphql Party
杭州 GraphQLParty 往期记录(slide,照片,预告,视频等)
Stars: ✭ 142 (+446.15%)
Mutual labels:  graphql-server, graphql-api
server
Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
Stars: ✭ 20 (-23.08%)
Mutual labels:  graphql-server, graphql-api
Pop
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder
Stars: ✭ 160 (+515.38%)
Mutual labels:  graphql-server, graphql-api
Grial
A Node.js framework for creating GraphQL API servers easily and without a lot of boilerplate.
Stars: ✭ 194 (+646.15%)
Mutual labels:  graphql-server, graphql-api
Graphql
Haskell GraphQL implementation
Stars: ✭ 36 (+38.46%)
Mutual labels:  graphql-server, graphql-api
DotNetGraphQL
A sample demonstrating how to create a GraphQL Backend in .NET and consume it from a .NET mobile app created using Xamarin
Stars: ✭ 78 (+200%)
Mutual labels:  graphql-server, graphql-api
Graphqlize
A Clojure & JVM library for developing GraphQL API instantly from Postgres and MySQL databases
Stars: ✭ 240 (+823.08%)
Mutual labels:  graphql-server, graphql-api
Graphql Stack
A visual explanation of how the various tools in the GraphQL ecosystem fit together.
Stars: ✭ 117 (+350%)
Mutual labels:  graphql-server, graphql-api
finch-graphql
Local GraphQL API in the background process of a web extension.
Stars: ✭ 48 (+84.62%)
Mutual labels:  graphql-server, graphql-api
Daptin
Daptin - Backend As A Service - GraphQL/JSON-API Headless CMS
Stars: ✭ 1,195 (+4496.15%)
Mutual labels:  graphql-server, graphql-api
Storefront Api
Storefront GraphQL API Gateway. Modular architecture. ElasticSearch included. Works great with Magento1, Magento2, Spree, OpenCart, Pimcore and custom backends
Stars: ✭ 180 (+592.31%)
Mutual labels:  graphql-server, graphql-api
Rest And Graphql
⚡️ Highly scalable REST API codebase with GraphQL layer on its ⚡️
Stars: ✭ 55 (+111.54%)
Mutual labels:  graphql-server, graphql-api
Graphql Spqr Spring Boot Starter
Spring Boot 2 starter powered by GraphQL SPQR
Stars: ✭ 187 (+619.23%)
Mutual labels:  graphql-server, graphql-api
Graph Node
Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
Stars: ✭ 884 (+3300%)
Mutual labels:  graphql-server, graphql-api
Graphql Spqr
Java 8+ API for rapid development of GraphQL services
Stars: ✭ 843 (+3142.31%)
Mutual labels:  graphql-server, graphql-api
36 Graphql Concepts
📜 36 concepts every GraphQL developer should know.
Stars: ✭ 209 (+703.85%)
Mutual labels:  graphql-server, graphql-api
kanji
A strongly typed GraphQL API framework
Stars: ✭ 12 (-53.85%)
Mutual labels:  graphql-server, graphql-api

NGraphQL - GraphQL for .NET

NGraphQL is a framework for implementing GraphQL APIs in .NET. It provides server- and client-side components.

Features

  • Conforms to GraphQL Specification, Oct 2021 Edition.
  • GraphQL model is defined using plain c# (POCO) classes decorated with some attributes. Unlike other .NET GraphQL solutions, NGraphQL-based API definitions look and feel like real .NET artifacts - strongly typed, compact and readable.
  • Server and client components. ASP.NET Core -based HTTP server implementation following the standard "serving over HTTP" rules
  • Light-weight but capable GraphQL Client - supports both dynamic-type objects for return data, or strongly-typed objects by directly using the GraphQL c# classes from the model.
  • Modular construction - separately coded modules define parts of the overall GraphQL API Schema; modules are registered with the GraphQL host server which implements the GraphQL API.
  • Parallel execution of Query requests
  • Sync and Async resolver methods
  • Full Introspection support
  • Schema descriptions are automatically imported from XML comments in c# code
  • Full support for fragments and standard directives (@include, @skip, @deprecated)
  • Custom Scalars out of the box (Double, ID, Uuid, DateTime etc)
  • Fast, efficient query parser; query cache - parsed queries are saved in cache for future reuse with different input variables
  • Facilities for input validation and returning failures as multiple GraphQL errors
  • Robust implementation of batching (N+1 problem)
  • Integration with relational databases and ORMs - the BookStore Sample shows a GraphQL server on top of a data-connected application, with batching support.
  • Built-in logging and diagnostics, query timings and metrics

Packages and Components

NGraphQL binaries are distributed as a set of NuGet packages:

Package Description DLL Size, KB
NGraphQL Basic classes shared by client and server components. 23
NGraphQL.Client GraphQL client. 21
NGraphQL.Server GraphQL server implementation not tied to a specific transport protocol. 174
NGraphQL.Server.AspNetCore GraphQL HTTP server based on ASP.NET Core stack. 23

Examples

The repo contains a TestApp with HTTP server and Graphiql UI. It is used in HTTP server harness and unit tests. It is a made-up GraphQL API about abstract Things, and it is void of any real semantic meaning. The sole purpose of this app is to provide a number of types and methods covering the many aspects of the GraphQL protocol. Run the HTTP server harness and play with the Graphiql page in browser.

Run the unit tests and see the many request/response examples used there. The unit tests write a detailed log as they go. Run the tests, locate the log file in the bin folder, and look inside for many examples of GraphQL requests and responses along with the metrics. See this file here: UnitTestsLog.

See also Star Wars Example in a separate github repository.

VITA ORM contains a sample project implementing a GraphQL Server for a BookStore sample application. Among other things, it shows how (N+1) problem can be efficiently handled automagically by a smart-enough ORM. Most of the related entities like Book.Publisher or Book.Authors are batch-loaded automatically by the ORM.

Documentation

See the Wiki pages for this project.

Limitations

  • Code-first only, no schema-first scenario. Implementing a working GraphQL API requires creating a number of detailed c#/.NET artefacts that cannot be directly derived from the Schema document. The complete schema-first scenario is not feasible.

  • Subscriptions are not supported directly, only at GraphQL parsing/invocation level. The actual bi-directional channel (websockets) is expected to be implemented in a separate library. A sample and a reference implementation is planned in the future.

System requirements

Visual Studio 2022+, .NET Standard 2.0, fully compatible with .NET 5, 6 and up.

Other GraphQL on .NET solutions

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].