ChilliCream / ChilliCream/graphql-platform

Add analyzers

Open
#8,072 2 comments 2 reactions 1 assignee View on GitHub

@michaelstaib is already working on this.

Since Oct 26, 2025.

🌶️ hot chocolate Area: AOT
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Product

Hot Chocolate

Is your feature request related to a problem?

Developers using the platform may not be following best practices.

The solution you'd like

Add analyzers such as:

  • Don't use .With(queryContext) and .Select together.
  • Node resolver id argument doesn't need [ID].
  • Don't need [Service].
  • Somehow warn when the user doesn't have the HC.EF package installed.
  • Encourage modern APIs (f.e. ObjectType<T>).
  • Specify requirements when using [Parent] and QueryContext.
  • Order of middlewares
  • Not providing an IReadOnlyList keys as the first argument of a dataloader
  • Validate that BindMember binds a valid member
  • Use source generator for root types aka make class partial
  • Parent type check
  • Dont use UseProjectionAttribute when using QueryContext<T>
  • Return type of property/method with [Lookup] should be nullable.
  • Return type of property/method with [Lookup] should not be a list.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.