Last post Mar 15, 2017 11:53 AM by VitaliyMF
Jan 15, 2017 12:33 PM|Ali.M.Habib|LINK
a little bit naive question but right now I want to create a web api to be more flexible I just read about gqphql , is it a good practice to accept a query string and return a string containing the result
any example using web api and graphql , I know I can secure queries with something like jws but am speaking about the idea and best practice any examples or blogs
Jan 16, 2017 06:54 AM|Chris Zhao|LINK
A sample web api project, see https://github.com/graphql-dotnet/graphql-dotnet.
Mar 15, 2017 11:53 AM|VitaliyMF|LINK
See also full-functional MVC Core example that provides GraphQL AP to SQL database: https://github.com/nreco/data/tree/master/examples/SqliteDemo.GraphQLApi
In this example SQLite 'northwind' DB is used for the sake of simplicity, but you can provide GraphQL API for SQL Server/MySQL/PostgreSQL data in the same manner.
JWT authentication may be added in the same way as for usual MVC Core webAPI (using Microsoft.AspNetCore.Authentication.JwtBearer package).