Install Dependencies - Mongo

Next we will install all packages that we will require for the backend when working with MongoDB data store. If you want to work with PostgreSQL go here. We will build up the use of each but will install all of them in the project now.

dotnet add package HotChocolate
dotnet add package HotChocolate.AspNetCore
dotnet add package HotChocolate.AspNetCore.Playground
dotnet add package HotChocolate.AspNetCore.Subscriptions
dotnet add package HotChocolate.Subscriptions.InMemory
dotnet add package HotChocolate.Types
dotnet add package HotChocolate.Types.Filters
dotnet add package HotChocolate.Types.Sorting

dotnet add package MongoDB.Driver

dotnet restore

The HotChocolate.AspNetCore package contains the ASP.NET core middle-ware for hot chocolate and also includes the Hot Chocolate query engine as a dependency.

The HotChocolate.AspNetCore.Playground package adds the GraphQL Playground IDE.

The HotChocolate.AspNetCore.Subcriptions package adds the capabilities to do subscriptions with the HotChocolate.Subscriptions.InMemory adding for it be in memory. Visit hotchocolate.io for using additional backends for subscriptions.

The HotChocolate.Types.Filterspackage adds the capabilities to do filtering on fields.

The HotChocolate.Types.Sorting package adds the capabilities to do sorting on fields.

Last updated