The document discusses GraphQL as an alternative to REST for building APIs. It provides reasons for using GraphQL like simplified workflows with a single endpoint, avoiding over- and under-fetching of data, and improved developer experience. The document then covers GraphQL concepts like schemas, queries, mutations, subscriptions and best practices. It also provides a demo of building a GraphQL API in .NET and discusses strategies for migrating from REST to GraphQL.
13. blogs.karthikeyanvk.in
Enter Text
What is GraphQL?
GraphQL is a query language for your API, and a
server-side runtime for executing queries by using a
type system you define for your data.
The Schema first approach relies upon the GraphQL schema language, coding conventions, and tries to provide a minimal amount of syntax. It is the easiest to get started though it does not currently support some advanced scenarios.
The GraphType first approach can be more verbose, but gives you access to all of the provided properties of your GraphType's and Schema. You are required to use inheritance to leverage that functionality.
MaxComplexity & FieldImpact
For example if I have 3 tables with 100, 120 and 98 rows and I know I will be querying the first table twice as much then a good estimation for avgImpact would be 105.
Define ObjectGraphType
Define InputObjectGraphType
Define query or mutation Type
Define schema and register them with resolve
MaxComplexity & FieldImpact
For example if I have 3 tables with 100, 120 and 98 rows and I know I will be querying the first table twice as much then a good estimation for avgImpact would be 105.
Finding real problem get you grounded about features to prioritize
Think like client and see who will be using it.