Skip to content

Support resolveField #109

@andheiberg

Description

@andheiberg
Q A
Bug report? yes
Feature request? yes
BC Break report? no
RFC? no
Version/Branch 0.6.2

http://webonyx.github.io/graphql-php/data-fetching/#default-field-resolver-per-type

resolveField is a feature in webonyx that allows you to define a type level resolver. You can still put a resolver on individual fields if you like, but basically you get the opportunity to define the resolver at the type level as a default.

The problem is that you alway register the default resolver for any field that doesn't have a resolver regardless of there being a parent resolveField. This is honestly perfectly acceptable behaviour but it does break the resolveField use case because of https://github.com/webonyx/graphql-php/blob/master/src/Executor/Executor.php#L622-L628

There's some tradeoffs there that I don't wanna make on your behalf. Let me know if this makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions