DEV Community

Cover image for Getting started with GraphQL in .NET 6 - Part 4 (Extra - Deploy to Azure Web App)
Bervianto Leo Pratama
Bervianto Leo Pratama

Posted on

2

Getting started with GraphQL in .NET 6 - Part 4 (Extra - Deploy to Azure Web App)

This post will be last part. I will give you videos about how I deploy it to Azure Web App (for Backend) and Azure Static Web App (for Frontend). I will give you some notes that you need to give more attention into it.

Video

Notes

BE Codes

  • I install the EF In Memory, since I don't want to deploy SQL Server at Azure yet. I have plan to post it to single article not in this series.
<ItemGroup>
    <!-- other dependencies... -->
    <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.0" />
    <!-- other codes ... -->
</ItemGroup>
Enter fullscreen mode Exit fullscreen mode
  • I update the Program.cs to use in memory.
// Add services to the container.
builder.Services.AddDbContext<NotesContext>(options =>
{
    // options.UseSqlServer(builder.Configuration.GetConnectionString("Default"));
    options.UseInMemoryDatabase("NotesTest");
});
Enter fullscreen mode Exit fullscreen mode

FE Codes

  • I update the backend (GraphQL) URL at index.tsx. You can update it to use environment instead of hardcoded, so you can setup the URL at build stage.
// other codes

const client = new ApolloClient({
  uri: 'https://graph-api-demo.azurewebsites.net/graphql',
  cache: new InMemoryCache()
});

// other codes
Enter fullscreen mode Exit fullscreen mode

Thank you

Great job gif

Image of Timescale

๐Ÿš€ pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applicationsโ€”without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

๐Ÿ‘‹ Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay