Skip to main content

Posts

Showing posts with the label GraphQL

Angular(v14) | GraphQL Client - Apollo Angular(v3) | JSON Server GraphQL Fake Endpoint | CRUD Example

In this article, we will implement Angular(v14) CRUD to consume the GraphQL endpoint using the Apollo Angular(v3) library. GraphQL API: GraphQL API mostly has a single endpoint. So data fetching or updating will be carried out by that single endpoint. For posting data or querying data, we have to follow its own syntax. GraphQL carries two essential operations: Query - (Fetching Data) Mutation - (Saving Data) Create An Angular(v14) Application: Let's create an Angular(v14) application to accomplish our demo.  Command To Create Angular Application ng new your_app_name Let's install the bootstrap into our application. npm install bootstrap Now configure the CSS and JS links of bootstrap in 'angular.json'. Let's add the bootstrap 'Navbar' component at 'app.component.html'. src/app/app.component.html: <nav class="navbar navbar-dark bg-primary"> <div class="container-fluid"> <div class="navbar-brand&qu

A CRUD Operation Demo With Blazor WebAssembly(.NET6) + Strawberry Shake GraphQL Client + MudBlazor UI + GraphQL API

In this article, we are to implement CRUD operation in Blazor WebAssembly(.NET6) by consuming GraphQL endpoint with help of  'Strawberry Shake'(Graphql Client Library). GraphQL Endpoint: In this demo, we have to consume the GraphQL endpoint from our Blazor WebAssembly application. Source code for .Net6 GraphQL CRUD operations. The article explains about creating .NET 6 GraphQL CRUD operations The video explains about creating .NET6 GraphQL CRUD operations Strawberry Shake: Strawberry shake is an open-source GraphQL client that is compliant with the newest GraphQL draft spec, which makes Strawberry Shake compatible with all GraphQL compliant servers like Hot Chocolate, Apollo Server, GraphQL Java, and various other servers out there. Strawberry Shake will generate the schema of GraphQL Server which will help to invoke the GraphQL endpoint very easily. Strawberry Shake CLI Tool: Strawberry shake CLI needs to be configured because CLI will help us to generate the GraphQL clie

.Net5 Blazor WebAssembly Application Invoke GraphQL Endpoints Using Strawberry Shake Library

In this article, we will implement a Blazor WebAssembly Application that consumes GraphQL endpoints using the Strawberry Shake library. Strawberry Shake: Strawberry Shake is a GraphQL client library that can be used by the .Net Standard Library. So all .NetCore applications (from .Net5) like APIs, MVC, Blazor Server, Blazor WebAssembly, etc. Strawberry Shake will generate all boilerplate code for the GraphQL Server schema, which lays an easy path for consuming the data from our Blazor WebAssembly application. Strawberry Shake CLI Tool Configuration: Strawberry Shake CLI needs to be configured because CLI will help us to generate the GraphQL client. Create a dotnet tool-manifest dotnet new tool-manifest Now install the Strawberry Shake CLI Tool dotnet tool install StrawberryShake.Tools --local Create A .Net5 Blazor WebAssembly Project: Let's start our journey by creating a .Net5 Blazor WebAssembly application sample project. Visual Studio users can easily create .Net5 Bl