Skip to content

Payload helper does not correctly infer field name from Task<T> #4504

Closed
@tobias-tengler

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The new [Payload] helper fails to correctly infer the name of a Task<T> field.

Steps to reproduce

[Payload]
public async Task<MyType?> MutationAsync()

Relevant log output

`task`1` is not a valid GraphQL type name. (Parameter 'value' (HotChocolate.Types.ObjectType<HotChocolate.Types.Payload>)

Additional Context?

"Workaround" is to specify the name by hand: [Payload("myfield")]

Product

Hot Chocolate

Version

12.4.0-preview.11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions