Skip to content
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

Ignoring of the name parameter of field attribute #1163

Open
qnixdev opened this issue Mar 5, 2024 · 3 comments
Open

Ignoring of the name parameter of field attribute #1163

qnixdev opened this issue Mar 5, 2024 · 3 comments

Comments

@qnixdev
Copy link

qnixdev commented Mar 5, 2024

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Version 0.15.2

Hello all!
I'm trying to change the name of a field, but I'm getting a name error...
In the parameter I explicitly specified the property name, but it is ignored.
I have a transformer that converts a value to a timestamp before creating an object (implementation omitted for brevity).

use Overblog\GraphQLBundle\Annotation as GQL;

#[GQL\Input(name: 'MyInput')]
class MyInputType
{
    #[GQL\Field(name: 'endTime', type: 'String!')]
    private int $endTimestamp;
}
{
    "message": "Variable \"$input\" got invalid value {\"endTime\":\"18:00\"}; Field value.endTimestamp of required type String! was not provided.",
    "extensions": {
        "category": "graphql"
    },
    "locations": [
        {
            "line": 1,
            "column": 24
        }
    ]
}
@Vincz
Copy link
Collaborator

Vincz commented Mar 5, 2024

Hey @qnixdev! Looks like a cache problem to me. Did you check the generated Input?

@qnixdev
Copy link
Author

qnixdev commented Mar 5, 2024

Hey @qnixdev! Looks like a cache problem to me. Did you check the generated Input?

Yes of course I checking the generated Input. Also I'am cleared all the cache, but this didn't help((
If open the /graphiql documentation, the property name will also be generated from the field name..

@Vincz
Copy link
Collaborator

Vincz commented Mar 30, 2024

Hi @qnixdev Any news about this? Have you been able to fix it?

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

No branches or pull requests

2 participants