ChilliCream / ChilliCream/graphql-platform

GraphQL default arguments are not recognised by StrawberryShake.

Open
#6,469 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ strawberry shake
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Is there an existing issue for this?
  • I have searched the existing issues
Product

Strawberry Shake

Describe the bug

A graphQL operation that has default argument values is not recognised by StrawberryShake forcing the user to provide them.

Steps to reproduce
  1. Generate generate a client with a query that has default argument values
query MyQuery(
  $Id: String!
  $defaultArg0: Int = 0
  $defaultArg1: [String] = null
) {
  myType(id: $Id, arg0: $defaultArg0,  arg1: $defaultArg0) {
 ...etc
}

The default arguments are not set in the generated client.MyQuery.ExecuteAsync( ... ) method and no overload is provided.

Relevant log output

No response

Additional Context?

No response

Version

13.5.0

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 with Strawberry Shake client generation for the reproduced MyQuery operation and trace how its generated client.MyQuery.ExecuteAsync(...) method handles the shown default arguments. Done means default argument values no longer require caller-supplied values, with the generated client offering the expected optional invocation or overload.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.