# Interact with a GraphQL API from a .NET Core Application

DevFeed: [Interact with a GraphQL API from a .NET Core Application](<https://devfeed.tech/articles/interact-with-a-graphql-api-from-a-net-core-application-21817.md>)

Original publisher: [Read original article](<https://www.thepolyglotdeveloper.com/blog/2022/08/interact-graphql-api-dotnet-core-application/>)

Author: Nic Raboy

Published: 2022-08-03T13:00:00Z

Content type: tutorial

Language: en

Sources: [Nic Raboy](<https://devfeed.tech/sources/nic-raboy.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [.NET](<https://devfeed.tech/topics/net.md>), [API](<https://devfeed.tech/topics/api.md>), [C#](<https://devfeed.tech/topics/csharp.md>), [Data serialization](<https://devfeed.tech/topics/data-serialization.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [Firestore](<https://devfeed.tech/topics/firestore.md>)

Tags: [account](<https://devfeed.tech/tags/account.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [app](<https://devfeed.tech/tags/app.md>), [application](<https://devfeed.tech/tags/application.md>), [atlas](<https://devfeed.tech/tags/atlas.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [cli](<https://devfeed.tech/tags/cli.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [code](<https://devfeed.tech/tags/code.md>), [command](<https://devfeed.tech/tags/command.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [core](<https://devfeed.tech/tags/core.md>), [csharp](<https://devfeed.tech/tags/csharp.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [net](<https://devfeed.tech/tags/net.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

The tutorial sets up a .NET Core console app to query a GraphQL API generated with MongoDB App Services. It requires .NET Core 6 or later and a MongoDB Cloud account with an M0 or better Atlas cluster; the CLI is used in the walkthrough, though Visual Studio is also an option. The excerpt says GraphQL is accessed over HTTP and a GraphQL package is optional, while a package simplifies querying; it also calls for a JSON dependency. The excerpt ends during the API deployment section, so it does not show the later query code.

## Source excerpt

When it comes to C#, it's not too difficult or time-consuming to create or consume RESTful APIs. In fact, I recently published a tutorial that demonstrated how to create a RESTful API with .NET Core u... The post Interact with a GraphQL API from a .NET Core Application appeared first on MongoDB.