ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.26k stars 746 forks source link

Unable to Upload file on a Fusion #6429

Closed ThanhDeveloper closed 1 year ago

ThanhDeveloper commented 1 year ago

Is there an existing issue for this?

Product

Hot Chocolate

Describe the bug

Unable to Upload file on a Fusion

Steps to reproduce

I have several applications running on the following ports:

Noted: It is working on simple project use hot chocolate. But not working on bff and fusion Please tell me may I was wrong or can I detect root cause of this problem ?

UPDATE:: If I upload file from API project one at https://localhost:7002 it will be success ! But I can't upload it through fusion schema !

Not working on bff and fusion:

image

Working on simple project

image

Relevant log output

Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished HTTP/1.1 POST http://localhost:7002/api/graphql - 404 0 - 17.6763ms
System.Net.Http.HttpClient.Common.ClientHandler: Information: Received HTTP response headers after 22.5157ms - 404
System.Net.Http.HttpClient.Common.LogicalHandler: Information: End processing HTTP request after 33.9293ms - 404
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Hot Chocolate GraphQL Pipeline'
Microsoft.EntityFrameworkCore.Infrastructure: Debug: 'SessionDbContext' disposed.
Microsoft.EntityFrameworkCore.Database.Connection: Debug: Disposing connection to database 'Sessions' on server 'localhost,1434'.
Microsoft.EntityFrameworkCore.Database.Connection: Debug: Disposed connection to database '' on server '' (1ms).
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished HTTP/2 POST https://localhost:7001/api/graphql - 500 - application/graphql-response+json;+charset=utf-8 132.9250ms

Additional Context?

No response

Version

13.5.0-preview.18

michaelstaib commented 1 year ago

This is correct... you must send the GraphQL-Preflight header with a value of 1 when doing file uploads... this header must also be propagated to the subgraph. If you use our gateway template we have this already setup in the newest version.