GraphQL Basics NReco.GraphQL documentation
GraphQL is a new API standard that provides a more efficient, powerful and flexible alternative to REST. It was developed and open-sourced by Facebook in 2015 and is now maintained by a large community of companies and individuals from all over the world.
Since being introduced by Facebook, GraphQL has taken the API world by storm as an alternative to REST APIs. GraphQL fixes many problems that API developers and users have found with RESTful architecture.
Most applications today have the need to fetch data from a server where that data is stored in a database. It's the responsibility of the API to provide an interface to the stored data that fits an application's needs. GraphQL is often confused with being a database technology. This is a misconception, GraphQL is a query language for APIs - not databases. In that sense it's database agnostic and effectively can be used in any context where an API is used.
What is a GraphQL-to-SQL
Obviously, configuring and maintaining defined GraphQL schemas takes time and requires specialists who be able to do those changes in code-level.
Our NReco.GraphQL engine allows you to define schemas extremely fast in understandable json-format and fetch data directly from database. It is based on open-source GraphQL.NET parser which is stable implementation of GraphQL in .NET world.
NReco.GraphQL API Overview
|GraphqlDbAdapter||translates grapql queries to SQL; performs all necessary logic related to query execution and data loading according to the specified schema metadata.|
|GraphqlConfiguration||defines schema for GraphQL-to-SQL engine (objects mapping, global settings)|
|ObjectSchema||defines GraphQL object schema and mapping to database table (or view). Contains list of FieldSchema-s|
|FieldSchema||defines object's field schema that corresponds to database column|