Skip to content

Eliminated unnecessary list allocations in Validation.fs and migrated to underscore property access lambda syntax #536

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

Merged
merged 2 commits into from
Aug 19, 2025

Conversation

xperiandri
Copy link
Collaborator

No description provided.

@xperiandri xperiandri requested a review from Copilot August 17, 2025 22:37
Copy link

@Copilot 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 optimizes code by eliminating unnecessary list allocations and modernizes F# syntax by migrating from explicit lambda expressions to the more concise underscore property access syntax.

  • Replaced array/list creation with sequence operations to avoid intermediate allocations
  • Migrated from fun x -> x.Property syntax to _.Property syntax throughout the codebase
  • Updated option handling to use ValueOption where appropriate for better performance

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/FSharp.Data.GraphQL.Tests/DeferredTests.fs Updated lambda to underscore syntax for property access
tests/FSharp.Data.GraphQL.IntegrationTests/SwapiRemoteProviderTests.fs Simplified array mapping with underscore syntax
src/FSharp.Data.GraphQL.Shared/Validation.fs Major refactoring: replaced arrays with sequences, migrated lambdas to underscore syntax, updated option handling
src/FSharp.Data.GraphQL.Server/Values.fs Updated array mapping to use underscore syntax
src/FSharp.Data.GraphQL.Server/Executor.fs Simplified middleware function reference with underscore syntax
src/FSharp.Data.GraphQL.Server/Execution.fs Updated option mapping to use underscore syntax
src/FSharp.Data.GraphQL.Client/Extensions.fs Simplified array mapping in MD5 hash computation
src/FSharp.Data.GraphQL.Client/BaseTypes.fs Updated sequence sorting to use underscore syntax
src/FSharp.Data.GraphQL.Client.DesignTime/ProvidedTypesHelper.fs Multiple updates to use underscore syntax and sequence operations
src/FSharp.Data.GraphQL.Client.DesignTime/GraphQLProvider.DesignTime.fs Updated array filtering to use underscore syntax
samples/relay-book-store/Schema.fs Updated option mapping to use underscore syntax

@xperiandri xperiandri merged commit 023790c into dev Aug 19, 2025
3 checks passed
@xperiandri xperiandri deleted the Eliminate-list-allocations-in-validation branch August 19, 2025 14:25
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.

1 participant