Skip to content

Conversation

@VectorTetra
Copy link
Contributor

No description provided.

@xperiandri xperiandri requested a review from Copilot October 3, 2025 12:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes tests for file upload processing by updating the GraphQL upload type name from "Upload" to "File" and adding missing properties to the FileData type. The changes ensure that file upload functionality works correctly across the test suite by removing temporary "Skip" attributes from tests and updating schema definitions.

  • Updated the upload type name consistently from "Upload" to "File" throughout the codebase
  • Added FileName property to FileData type to support file identification
  • Fixed test mocks to include the new FileName property in file creation

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/FSharp.Data.GraphQL.Tests/Helpers.fs Updated mock input context to include FileName property in file responses
tests/FSharp.Data.GraphQL.Tests/FileTests.fs Changed FileType to File in mutation variable type and removed BOM character
tests/FSharp.Data.GraphQL.IntegrationTests/introspection.json Updated document ID reflecting schema changes
tests/FSharp.Data.GraphQL.IntegrationTests/LocalProviderWithOptionalParametersOnlyTests.fs Changed Upload type to File and re-enabled previously skipped tests
tests/FSharp.Data.GraphQL.IntegrationTests/LocalProviderTests.fs Updated type references and re-enabled tests with some cleanup
tests/FSharp.Data.GraphQL.IntegrationTests/Helpers.fs Enhanced File type with MakeUpload method supporting optional upload name parameter
tests/FSharp.Data.GraphQL.IntegrationTests/FSharp.Data.GraphQL.IntegrationTests.fsproj Disabled some test files and commented out release build references
tests/FSharp.Data.GraphQL.IntegrationTests.Server/Startup.fs Replaced hardcoded header with dynamic request type detection
tests/FSharp.Data.GraphQL.IntegrationTests.Server/Schema.fs Major schema refactor replacing Upload with FileType and implementing proper mutation handlers
tests/FSharp.Data.GraphQL.IntegrationTests.Server/FSharp.Data.GraphQL.IntegrationTests.Server.fsproj Removed CustomSchemaTypes.fs and added user secrets
tests/FSharp.Data.GraphQL.IntegrationTests.Server/CustomSchemaTypes.fs Deleted file containing old Upload type definition
src/FSharp.Data.GraphQL.Shared/SchemaDefinitions.fs Renamed FileType to File and improved variable handling with null checks
src/FSharp.Data.GraphQL.Shared/InputContext.fs Added FileName property to FileData type and removed BOM character
src/FSharp.Data.GraphQL.Server/FSharp.Data.GraphQL.Server.fsproj Added FsToolkit.ErrorHandling package reference
src/FSharp.Data.GraphQL.Server.Giraffe/HttpHandlers.fs Added multipart request detection and dynamic request type header setting
src/FSharp.Data.GraphQL.Server.AspNetCore/StartupExtensions.fs Added HttpContextRequestExecutionContext service registration
src/FSharp.Data.GraphQL.Server.AspNetCore/RequestExecutionContext.fs Enhanced file handling with FileName property and memory stream usage
src/FSharp.Data.GraphQL.Client/Upload.fs Major refactor adding Name property, optional parameters, and improved constructor overloads
src/FSharp.Data.GraphQL.Client/Serialization.fs Changed Upload serialization from null to Name property
src/FSharp.Data.GraphQL.Client/MimeTypes.fs Minor formatting improvement
src/FSharp.Data.GraphQL.Client/GraphQLClient.fs Enhanced multipart request handling with proper file naming and content disposition
src/FSharp.Data.GraphQL.Client.DesignTime/ProvidedTypesHelper.fs Updated type mapping and error handling for upload types

@xperiandri xperiandri changed the title Fixed tests for file upload processing Fixed file upload tests Oct 3, 2025
@xperiandri xperiandri merged commit 5ca80cb into fsprojects:dev Oct 3, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants