ChilliCream / ChilliCream/graphql-platform
Deserialization of null values in the list
Nobody has claimed this yet.
- 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
In schema I have an object WinLine in schema with list line: [Int]!
According to the document https://spec.graphql.org/October2021/#sec-Combining-List-and-Non-Null the list may contain values [1, 2, null] but the StrawberryShake v12.17-13.3.1 client throws an exception error:
Unhandled exception. StrawberryShake.GraphQLClientException: The requested operation requires an element of type 'Number', but the target element is of type 'Null'.
Steps to reproduce
- add an object of type
[Int]!to the GraphQL API request - try to deserialise the request which contains a list object with values
[0, null, 1, 2], for example
Relevant log output
No response
Additional Context?
No response
Version
13.3.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Strawberry Shake v13.3.1 deserialization of a non-null list type [Int]! containing [0, null, 1, 2]. Trace the client deserialization path that raises the GraphQLClientException; done means the response is accepted and the null list element is preserved without an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, graphql
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100