Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added failing test for sorting on an async code-first resolver #7535

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

glen-84
Copy link
Collaborator

@glen-84 glen-84 commented Sep 30, 2024

Summary of the changes (Less than 80 chars)

  • Added failing test for sorting on an async code-first resolver.

  • The issue is that the matched Resolve overload does not capture the result type.

Relates to #6252.

@glen-84 glen-84 marked this pull request as draft September 30, 2024 09:45
@glen-84 glen-84 changed the title Removed Resolve overload that doesn't capture the result type Added failing test for sorting on an async code-first resolver Sep 30, 2024
@glen-84
Copy link
Collaborator Author

glen-84 commented Oct 16, 2024

I think that this might also be causing this issue:

descriptor
    .Field("bookById")
    .Argument("id", a => a.Type<NonNullType<UuidType>>())
    .Resolve(async ctx => await ctx
        .Service<BookService>()
        .GetBookAsync(ctx.ArgumentValue<Guid>("id")));
  1. Unable to infer or resolve the type of field Query.bookById. Try to explicitly provide the type like the following: descriptor.Field("field").Type<List<StringType>>(). (GettingStarted.Types.QueryType)

Using Resolve<Book?> works, but it should probably not be necessary?

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

Successfully merging this pull request may close these issues.

1 participant