GraphQL server with .NET Framework ( not .NET CORE)

In a recent post we had listed out analysis done and conclusions made when asked by a customer to convert their existing API to GraphQL. While exploring GraphQL with .NET framework we realized there is a large gap in examples and demos on using GraphQL with full scale .NET framework and EntityFramework. We took some time out to create a sample repo and put it out there so that other programmers don’t have to wonder whether its even possible Smile 

The repo is available at

Why another GraphQL repo?

Most GraphQL solutions showing usage of GraphQL on the client side. The ones on the server side are either using APOLLO servers with javascript frameworks or .NET Core. The project we wanted to use GraphQL in was using standard .NET framework with ADO.NET .

We used various samples and demos to build out a simple demo app showcasing the use of GraphQL and graphiql with .NET framework. In some senses this is the simplest and most vanilla GraphQL server demo you will see which is what we were looking for.

Technology Stack

  • GraphQL server with full .NET 4.5 framework
  • Code First Entity Framework 6.0
  • Graphiql

Development Platform

  • Windows Machine
  • Visual Studio
  • Visual Studio Code

This example showcases

  1. Parameterized Queries
  2. Nested Queries
  3. Parameterized Mutations
  4. Does NOT use Dependency Injection



The api exposes a simple Person-Hobby system with the following relationship


The Schema allows for the following operations

  1. Query Person by ID ( allows nested queries to get person’s hobbies)


  1. Query Hobby by ID ( Including get count of people interested in that hobby)


  1. Create new Hobby (Mutation)


Using Graphiql

The nuget at is made for .NET Core and does not work with the standard .NET framework. We tried using the Graphiql repo at directly but it had some issues building on a windows machine.( . We finally used the fork at to get this working on a Windows Machine.

Steps were as under

  1. Clone repo from
  2. Install Yarn from
  3. Open Command Prompt and Navigate to main project
  4. Use “Yarn Install” to install all dependencies
  5. “npm run build” on the parent directory
  6. Navigate to Example directory
  7. npm install”
  8. Update function graphQLFetcher in example/index.html to hit the HobbyAPIServer


9. “npm start”

10. Navigate to localhost:8080

What is shown here is simply how to connect the various pieces. However if someone needs specific steps please ping us at and we will write up a tutorial

Happy Coding!

Team Cennest

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>