Skip to content

Conversation

@OwlyCode
Copy link
Contributor

@OwlyCode OwlyCode commented Feb 26, 2020

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Documented? no
License MIT

When upgrading to 13.1 my API broke: all of a sudden, some fields were null instead of their actual value.

The problem is inside the FieldResolver, it does not handles methods with no leading get prefix. In my case my entity looks like this:

class Entity
{
    public function hasSomething() {
        //...
    }
}

And the schema:

Entity:
    type: object
    config:
        fields:
            hasSomething:
                type: "Boolean"
            # ...

We want to call $entity->hasSomething() during resolution, not only $entity->getHasSomething().

@mcg-web
Copy link
Contributor

mcg-web commented Mar 2, 2020

Thank you @OwlyCode !

@mcg-web mcg-web merged commit 827e2de into overblog:master Mar 2, 2020
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.

3 participants