Hot Chocolate
GraphQL is a query language and server-side runtime for application programming interfaces (APIs) that prioritizes giving clients exactly the data they request and no more. GraphQL is designed to make APIs fast, flexible, and developer-friendly.
https://www.opencodez.com/web-development/tutorial6-51-imp-graphql-interview-questions-answers.htm
Hot Chocolate is an open-source GraphQL server built for the Microsoft .NET platform. It removes the complexity of building GraphQL APIs from scratch with built-in features for queries, mutations, and subscriptions
We’ll be building a GraphQL API backend with Hot Chocolate GraphQL
Resolvers are functions that tell the Hot Chocolate GraphQL server how to fetch the data associated with a particular schema. In simple terms, a resolver acts as a GraphQL query handle
- Open your browser and head over to the port your GraphQL server is listening on (ours is http://localhost:5000/graphql) to open the Hot Chocolate built-in GraphQL IDE Banana Cake Pop
- we will use our GraphQL IDE Banana Cake Pop.
- run npm install to ensure all deps are downloaded
- Scaffold-DbContext "Host=localhost;Database=magic5;Username=postgres;Password=sa" Npgsql.EntityFrameworkCore.PostgreSQL -OutputDir Models
Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL.
Apollo Client :
A powerful JavaScript GraphQL client, designed to work well with React, React Native, Angular 2, or just plain JavaScript.Apollo Client is a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL. Use it to fetch, cache, and modify application data, all while automatically updating your UI.
Apollo Client is a state management library that simplifies managing remote and local data with GraphQL. Apollo Client's intelligent caching and declarative approach to data fetching can help you iterate faster while writing less code. Additionally, if you need custom functionality, you can create your dream client by building extensions on top of Apollo Client
---------------------------------------
<p id="demo"></p>
<script>
hello = function() {
return "Hello World!";
}
document.getElementById("demo").innerHTML = hello();
-------------------------------------------------------------
<body>
<p id="demo"></p>
<script>
hello = () => {
return "Hello World!";
}
document.getElementById("demo").innerHTML = hello();
</script>
</body>
</html>
--------------------------------
<body>
<script>
class Car {
constructor(name) {
this.brand = name;
}
present() {
return 'I have a ' + this.brand;
}
}
const mycar = new Car("Ford");
mycar.present();
</script>
</body>
Comments
Post a Comment