ChilliCream / ChilliCream/graphql-platform

No option to disable Cost Analyzer

Open
#7,679 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Product

Hot Chocolate

Version

14

Link to minimal reproduction

N/A

Steps to reproduce

We're using the AddGraphQLFunction() extension method in our project which in turn calls https://github.com/ChilliCream/graphql-platform/blob/ad8fdf0f4ed5cec45e8da34ea7e175fa3f66f9ee/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs#L103 but there's no option to configure if I want to disable the default security exposed through the AddGraphQLFunction() extension method.

Some way to override the cost analyzer and disable it would be nice since we don't have any use for the cost directives.

What is expected?

The option to disable cost analyzer exists

What is actually happening?

No option to disable the cost analyzer exists

Relevant log output

No response

Additional context

No response

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.

Research direction

Start at src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs around line 103, where AddGraphQLFunction() is called. Trace how the cost analyzer is enabled and identify the configuration surface needed to disable it. Done means users can opt out of the default cost analyzer while retaining the extension's other behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, graphql
Domain
backend-api-design, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.