Convert Figma logo to code with AI

ChilliCream logographql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.

5,135
735
5,135
440

Top Related Projects

GraphQL for .NET

🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.

38,831

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

GraphQL Java implementation

The GraphQL toolkit for Elixir

Quick Overview

ChilliCream/graphql-platform is a comprehensive GraphQL server and client framework for .NET. It provides a powerful set of tools for building and consuming GraphQL APIs, including Hot Chocolate (server), Strawberry Shake (client), and Banana Cake Pop (IDE). This platform aims to simplify GraphQL development in the .NET ecosystem.

Pros

  • Comprehensive solution covering server, client, and IDE aspects of GraphQL development
  • Strong performance and scalability for enterprise-level applications
  • Extensive documentation and active community support
  • Seamless integration with .NET Core and ASP.NET Core

Cons

  • Steeper learning curve compared to simpler GraphQL libraries
  • May be overkill for small projects or simple APIs
  • Requires familiarity with .NET ecosystem
  • Some advanced features may require additional configuration

Code Examples

  1. Defining a GraphQL schema:
public class Query
{
    public Book GetBook() =>
        new Book
        {
            Title = "C# in depth",
            Author = new Author
            {
                Name = "Jon Skeet"
            }
        };
}

public class Book
{
    public string Title { get; set; }
    public Author Author { get; set; }
}

public class Author
{
    public string Name { get; set; }
}
  1. Creating a GraphQL server:
public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services
            .AddGraphQLServer()
            .AddQueryType<Query>();
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        app
            .UseRouting()
            .UseEndpoints(endpoints =>
            {
                endpoints.MapGraphQL();
            });
    }
}
  1. Executing a GraphQL query using Strawberry Shake client:
var client = new BookClient();
var result = await client.GetBook.ExecuteAsync();

Console.WriteLine($"Title: {result.Data.Book.Title}");
Console.WriteLine($"Author: {result.Data.Book.Author.Name}");

Getting Started

  1. Install the NuGet packages:
dotnet add package HotChocolate.AspNetCore
dotnet add package HotChocolate.Data
  1. Create a simple Query class:
public class Query
{
    public string Hello() => "World";
}
  1. Configure the GraphQL server in Startup.cs:
services
    .AddGraphQLServer()
    .AddQueryType<Query>();
  1. Map the GraphQL endpoint:
app.UseEndpoints(endpoints =>
{
    endpoints.MapGraphQL();
});
  1. Run your application and navigate to /graphql to access Banana Cake Pop IDE.

Competitor Comparisons

GraphQL for .NET

Pros of graphql-dotnet

  • More mature and established project with a larger community
  • Extensive documentation and examples available
  • Flexible and customizable, allowing for more control over implementation

Cons of graphql-dotnet

  • Requires more boilerplate code and manual setup
  • Less opinionated, which can lead to inconsistencies across projects
  • Steeper learning curve for beginners

Code Comparison

graphql-dotnet:

public class StarWarsQuery : ObjectGraphType
{
    public StarWarsQuery(ICharacterRepository repository)
    {
        Field<CharacterType>(
            "hero",
            resolve: context => repository.GetHero()
        );
    }
}

graphql-platform (Hot Chocolate):

public class Query
{
    public async Task<Character> GetHero([Service] ICharacterRepository repository)
    {
        return await repository.GetHero();
    }
}

The graphql-dotnet example requires more setup and explicit type definitions, while graphql-platform (Hot Chocolate) offers a more concise and intuitive approach. Hot Chocolate's code is more readable and requires less boilerplate, making it easier for developers to get started quickly. However, graphql-dotnet's approach provides more flexibility and control over the implementation details.

🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.

Pros of Apollo Server

  • More mature and widely adopted in the GraphQL ecosystem
  • Extensive documentation and community support
  • Seamless integration with Apollo Client and other Apollo tools

Cons of Apollo Server

  • Less focus on code-first approach compared to Hot Chocolate
  • May require more boilerplate code for complex schemas
  • Limited built-in support for real-time features like subscriptions

Code Comparison

Apollo Server:

const typeDefs = gql`
  type Query {
    hello: String
  }
`;

const resolvers = {
  Query: {
    hello: () => 'Hello world!',
  },
};

const server = new ApolloServer({ typeDefs, resolvers });

Hot Chocolate (GraphQL Platform):

public class Query
{
    public string Hello() => "Hello World!";
}

services
    .AddGraphQLServer()
    .AddQueryType<Query>();

Key Differences

  • Apollo Server uses a schema-first approach, while Hot Chocolate supports both schema-first and code-first approaches
  • Hot Chocolate offers more built-in features for .NET developers, including integration with ASP.NET Core
  • Apollo Server has a larger ecosystem of tools and extensions
  • Hot Chocolate provides better support for real-time features like subscriptions out of the box

Conclusion

Both Apollo Server and GraphQL Platform (Hot Chocolate) are powerful GraphQL server implementations. Apollo Server is more established and has a larger ecosystem, while Hot Chocolate offers more .NET-specific features and a code-first approach. The choice between them often depends on the development stack and specific project requirements.

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.

Pros of graphql-engine

  • Automatic GraphQL API generation from existing databases
  • Real-time subscriptions and live queries out of the box
  • Powerful authorization and access control system

Cons of graphql-engine

  • Limited flexibility for custom business logic implementation
  • Steeper learning curve for complex schema designs
  • Potential performance overhead for large-scale applications

Code Comparison

graphql-engine (Hasura):

type_defs = gql"""
  type User {
    id: Int!
    name: String!
    email: String!
  }
"""

query = gql"""
  query GetUser($id: Int!) {
    user(id: $id) {
      name
      email
    }
  }
"""

graphql-platform (Hot Chocolate):

public class Query
{
    public User GetUser(int id)
    {
        // Fetch user from database
    }
}

public class User
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Email { get; set; }
}

Both frameworks offer GraphQL implementations, but graphql-engine focuses on automatic API generation from existing databases, while graphql-platform provides more flexibility for custom C# implementations. graphql-engine excels in rapid development and real-time features, whereas graphql-platform offers better integration with .NET ecosystems and more control over business logic.

38,831

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

Pros of Prisma

  • More comprehensive database toolkit with ORM capabilities
  • Supports multiple databases (PostgreSQL, MySQL, SQLite, etc.)
  • Extensive documentation and active community support

Cons of Prisma

  • Steeper learning curve for developers new to ORMs
  • Less focused on GraphQL-specific features
  • May introduce additional complexity for simple projects

Code Comparison

Prisma schema definition:

model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
  posts Post[]
}

GraphQL Platform schema definition:

type User {
  id: ID!
  email: String!
  name: String
  posts: [Post!]!
}

Key Differences

  • Prisma is a database toolkit and ORM, while GraphQL Platform focuses on building GraphQL APIs
  • Prisma generates type-safe database clients, whereas GraphQL Platform provides GraphQL-specific tooling
  • GraphQL Platform offers more GraphQL-centric features like schema stitching and federation

Use Cases

  • Choose Prisma for projects requiring robust database management and ORM functionality
  • Opt for GraphQL Platform when building GraphQL-first applications with less focus on database interactions

Community and Ecosystem

  • Prisma has a larger community and more third-party integrations
  • GraphQL Platform is more specialized for GraphQL development but has a smaller ecosystem

GraphQL Java implementation

Pros of graphql-java

  • More mature and widely adopted in the Java ecosystem
  • Extensive documentation and community support
  • Flexible and customizable for complex GraphQL implementations

Cons of graphql-java

  • Steeper learning curve for beginners
  • Requires more boilerplate code for basic setups
  • Less opinionated, which can lead to inconsistent implementations

Code Comparison

graphql-java:

GraphQLSchema schema = GraphQLSchema.newSchema()
    .query(queryType)
    .build();
GraphQL graphQL = GraphQL.newGraphQL(schema).build();
ExecutionResult result = graphQL.execute(query);

graphql-platform:

public class Query
{
    public string Hello() => "World";
}

var schema = SchemaBuilder.New()
    .AddQueryType<Query>()
    .Create();

The graphql-java example shows the manual schema creation and execution, while graphql-platform demonstrates a more streamlined approach with automatic schema generation from C# classes.

graphql-java offers more control but requires more setup, whereas graphql-platform provides a simpler, convention-based approach. The choice between them depends on the specific project requirements, team expertise, and desired level of customization.

The GraphQL toolkit for Elixir

Pros of Absinthe

  • Built specifically for Elixir, leveraging its concurrency and fault-tolerance features
  • Strong integration with Phoenix framework for web applications
  • Extensive documentation and active community support

Cons of Absinthe

  • Limited to Elixir ecosystem, not as versatile for multi-language projects
  • Smaller ecosystem compared to more widely-used GraphQL implementations
  • Steeper learning curve for developers not familiar with Elixir

Code Comparison

Absinthe schema definition:

defmodule MyApp.Schema do
  use Absinthe.Schema

  query do
    field :hello, :string do
      resolve fn _, _, _ -> {:ok, "Hello, world!"} end
    end
  end
end

GraphQL Platform (Hot Chocolate) schema definition:

public class Query
{
    public string Hello() => "Hello, world!";
}

services
    .AddGraphQLServer()
    .AddQueryType<Query>();

Both implementations provide a simple "Hello, world!" query, but Absinthe uses Elixir's macro system for schema definition, while GraphQL Platform uses C# classes and method-based approach. Absinthe's syntax is more declarative, while GraphQL Platform's is more object-oriented.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

ChilliCream GraphQL Platform

NuGet Package License Slack channel Twitter


ChilliCream GraphQL Platform

Welcome to the ChilliCream GraphQL Platform!

We help you, developers and companies, to leverage your APIs to the next level with GraphQL. Strongly-typed schemas that match your APIs 100 percent. Efficient data fetching that reduces overall cost without extra effort. Consumer-friendly, declarative, self documented APIs that support you in your daily work to build powerful UIs effectively.

Most of our products are open-source and right here in this repository.

Everyone is welcome! Always remember to treat anyone respectful, no matter their gender, opinion, religion, or skin-tone. We're one world and together we're stronger!

Join our awesome community on Slack, if you would like to get in touch with us, need help, or just want to learn!

Our Products

Hot Chocolate

Hot Chocolate is the most efficient, feature-rich, open-source GraphQL server in the .NET ecosystem, that helps developers to build powerful GraphQL APIs and Gateways with ease.

Documentation

Banana Cake Pop

Banana Cake Pop is an awesome, performant, feature-rich GraphQL IDE that helps developers and data scientists to explore, share, and test any GraphQL API.

Banana Cake Pop can be installed as Desktop App, used as Web App, which can be installed through your browser of choice as well, or used as Middleware on your GraphQL endpoint. Middlewares are available in .NET and NodeJS. More middlewares will follow.

Documentation

Strawberry Shake

Strawberry Shake is an incredible, open-source GraphQL client for the .NET ecosystem, that helps developers to build awesome UIs in Blazor, Maui, and more. Other than most .NET GraphQL clients, Strawberry Shake is type-safe GraphQL client that generates .NET types from your GraphQL schema out of the box. Moreover, Strawberry Shake comes with a reactive store like in Relay and Apollo Client, which is nice due to the fact that you can build reactive UIs in .NET with stuff like client-side data caching and data-fetching strategies.

Documentation

Green Donut

Green Donut is a lightweight, yet powerful DataLoader that simplifies batching, caching, and solves the N+1 problem.

Documentation

Roadmap

If you are interested in upcoming releases, check out our Roadmap.

Official examples

Examples of things built on top of the ChilliCream GraphQL Platform that are open source and can be explored by others.

Contributing

Become a code contributor and help us make the ChilliCream GraphQL platform even better!

From our community

Check out what members of our awesome community have made!

Financial Contributors

Become a financial contributor and help us sustain our community.

Sponsor

Become a sponsor and get your logo on our README on Github with a link to your site.

Backer

Become a backer and get your image on our README on Github with a link to your site.