If you're new to GraphQL, check out these videos featured in the Learn More section, below
To run this sample, follow the Getting Started Instructions, below.
This app was featured at GraphQL Summit 2019.
The GraphQL backend is created in C# using the GraphQL NuGet Package.
This app requires us to run the GraphQL API using the terminal while using Visual Studio to build/deploy the Xamarin.iOS and/or Xamarin.Android app.
1. Run the GraphQL API
- Open the terminal
- In the terminal, clone this solution by entering the following command:
- Note: If you have already downloaded the solution, skip this step
git clone https://github.com/brminnick/dotnetgraphql.git
- In the terminal, navigate to the
DotNetGraphQL.APIfolder by entering the following command:
- On Windows
cd [path to DotNetGraphQL folder]\Source\DotNetGraphQL.API\
- On macOS
cd [path to DotNetGraphQL folder]/Source/DotNetGraphQL.API/
- In the terminal, run
DotNetGraphQL.API.csprojby entering the following command:
- Open a web browser
- In the web browser, navgiate to
- Confirm GraphiQL
2. Run the Xamarin.Android App
- In Visual Studio, open
- In Visual Studio, in the Solution Explorer, right-click on DotNetGraphQL.Android
- In the right-click menu, select Set as Startup Project
- In Visual Studio, build/deploy DotNetGraphQL.Android to an Android device
- Confirm the list of dogs from the GraphQL API appears
Learn more about Xamarin + GraphQL
- Getting Started with Xamarin
- Getting Started with Xamarin.Forms
- Install Visual Studio (PC) + Xamarin
- Install Visual Studio for Mac + Xamarin
- Microsoft Learn: Build Mobile Apps With Xamarin.Forms
- Xamarin Source Code
- Using Postman with GraphQL API
- GraphQL for .NET
- GraphQL vs REST
- GraphQL vs OData
- Awesome GraphQL
Consuming GraphQL in C#
This session on GraphQL + C# was delivered at GraphQL Summit 2019. It demonstrates how to create a GraphQL Backend in C# and connect it to a client-side mobile app written in C# using Xamarin.
Xamarin + GraphQL
The session on Xamarin + GraphQL was delivered at Xamarin Developer Summit 2019. It demonstrates how to create a Xamarin app in C# and connect it to an existing GraphQL Backend.
Learning GraphQL Series
This special series teaches the basics of GraphQL, how to interact with an existing GraphQL endpoint, how to create your first GraphQL Server, and how to deploy your GraphQL Server to the cloud using Azure!