-
Notifications
You must be signed in to change notification settings - Fork 75
Fixed file upload tests #538
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
Conversation
There was a problem hiding this 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 |
No description provided.