Skip to content

Optimization of field resolver expression execution #88

@Horusiath

Description

@Horusiath

This is idea to make FSharp.Data.GraphQL faster and allocating less memory on field execution - consider we have following field definition:

Define.Field("firstName", String, fun _ person -> person.FirstName)

At this point (compilation phase), we already know that the first function field (FieldExecutionContext) is not used. Therefore we actually don't need to create it, and we could pass a simple null instead. We know it won't be used anyway. This could give us potential gain on fields resolution as we construct contexts only when needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions