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

Unable to resolve type reference Upload on a Fusion Gateway #6344

Closed
1 task done
b93rn opened this issue Jul 17, 2023 · 1 comment
Closed
1 task done

Unable to resolve type reference Upload on a Fusion Gateway #6344

b93rn opened this issue Jul 17, 2023 · 1 comment
Labels
Area: Fusion Issue is related to Hot Chocolate Fusion 🐾 duplicate This issue or pull request already exists 🌶️ hot chocolate
Milestone

Comments

@b93rn
Copy link

b93rn commented Jul 17, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Product

Hot Chocolate

Describe the bug

When the Upload scalar is in one of the microservices that i'm trying to fuse i get the following run time error:

Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
HotChocolate.SchemaException: For more details look at the Errors property.

  1. Unable to resolve type reference `Upload`. (HotChocolate.Types.InputObjectType)
input NewProjectInputModelInput {
  file: Upload
  ...
}

When i remove the file property from this input object everything works fine.

Steps to reproduce

  1. Fuse an Api that contains an input object with:
public class NewProjectInputModel
{
    [GraphQLType(typeof(UploadType))]
    public IFile File { get; set; } = null!;
    ...
}
  1. Run all fusion steps to generate ./gateway.fgp
  2. Run the gateway
  3. Go to the banana cake pop UI
  4. Error with: Unable to resolve type reference Upload should appear.

Relevant log output

Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
      HotChocolate.SchemaException: For more details look at the `Errors` property.

      1. Unable to resolve type reference `Upload`. (HotChocolate.Types.InputObjectType)

         at HotChocolate.Configuration.RegisteredType.GetType[T](TypeReference typeRef)
         at HotChocolate.Types.InputField.OnCompleteField(ITypeCompletionContext context, ITypeSystemMember declaringMember, InputFieldDefinition definition)
         at HotChocolate.Types.FieldBase`1.CompleteField(ITypeCompletionContext context, ITypeSystemMember declaringMember)
         at HotChocolate.Types.FieldBase`1.HotChocolate.Types.Helpers.IFieldCompletion.CompleteField(ITypeCompletionContext context, ITypeSystemMember declaringMember)
         at HotChocolate.Internal.FieldInitHelper.CompleteFieldsInternal[TField](ITypeCompletionContext context, ITypeSystemMember declaringMember, TField[] fields)
         at HotChocolate.Internal.FieldInitHelper.CompleteFieldsInternal[TFieldDefinition,TField](ITypeCompletionContext context, ITypeSystemMember declaringMember, IEnumerable`1 fieldDefinitions, Func`3 fieldFactory, Int32 fieldCount)
         at HotChocolate.Internal.FieldInitHelper.CompleteFields[TFieldDefinition,TField](ITypeCompletionContext context, ITypeSystemMember declaringMember, IReadOnlyList`1 fieldDefs, Func`3 fieldFactory)
         at HotChocolate.Types.InputObjectType.OnCompleteFields(ITypeCompletionContext context, InputObjectTypeDefinition definition)
         at HotChocolate.Types.InputObjectType.OnCompleteType(ITypeCompletionContext context, InputObjectTypeDefinition definition)
         at HotChocolate.Types.TypeSystemObjectBase`1.CompleteType(ITypeCompletionContext context)
         at HotChocolate.Configuration.TypeInitializer.CompleteType(RegisteredType registeredType)
         at HotChocolate.Configuration.TypeInitializer.<CompleteTypes>b__29_0(RegisteredType type)
         at HotChocolate.Configuration.TypeInitializer.ProcessTypes(TypeDependencyFulfilled fulfilled, Func`2 action)
         at HotChocolate.Configuration.TypeInitializer.CompleteTypes()
         at HotChocolate.Configuration.TypeInitializer.Initialize()
         at HotChocolate.SchemaBuilder.Setup.InitializeTypes(SchemaBuilder builder, IDescriptorContext context, IReadOnlyList`1 types)
         at HotChocolate.SchemaBuilder.Setup.Create(SchemaBuilder builder, LazySchema lazySchema, IDescriptorContext context)
         at HotChocolate.SchemaBuilder.Create(IDescriptorContext context)
         at HotChocolate.SchemaBuilder.HotChocolate.ISchemaBuilder.Create(IDescriptorContext context)
         at HotChocolate.Execution.RequestExecutorResolver.CreateSchemaAsync(ConfigurationContext context, RequestExecutorSetup setup, RequestExecutorOptions executorOptions, IServiceProvider schemaServices, TypeModuleChangeMonitor typeModuleChangeMonitor, CancellationToken cancellationToken)
         at HotChocolate.Execution.RequestExecutorResolver.CreateSchemaServicesAsync(ConfigurationContext context, RequestExecutorSetup setup, CancellationToken cancellationToken)
         at HotChocolate.Execution.RequestExecutorResolver.GetRequestExecutorNoLockAsync(String schemaName, CancellationToken cancellationToken)
         at HotChocolate.Execution.RequestExecutorResolver.GetRequestExecutorAsync(String schemaName, CancellationToken cancellationToken)
         at HotChocolate.Execution.RequestExecutorProxy.GetRequestExecutorAsync(CancellationToken cancellationToken)
         at HotChocolate.AspNetCore.HttpPostMiddlewareBase.HandleRequestAsync(HttpContext context)
         at HotChocolate.AspNetCore.HttpPostMiddlewareBase.InvokeAsync(HttpContext context)
         at Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.<>c__DisplayClass20_0.<<UseCancellation>b__1>d.MoveNext()

Additional Context?

No response

Version

13.3.3

@b93rn b93rn added the 🐛 bug label Jul 17, 2023
@michaelstaib michaelstaib added 🐾 duplicate This issue or pull request already exists 🌶️ hot chocolate Area: Fusion Issue is related to Hot Chocolate Fusion labels Jul 17, 2023
@michaelstaib michaelstaib added this to the HC-13.4.0 milestone Jul 17, 2023
@michaelstaib
Copy link
Member

This is now implemented #6359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Fusion Issue is related to Hot Chocolate Fusion 🐾 duplicate This issue or pull request already exists 🌶️ hot chocolate
Projects
None yet
Development

No branches or pull requests

2 participants