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

Allow deprecating input fields and arguments (InputObjectType) #1071

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

TaProhm
Copy link
Contributor

@TaProhm TaProhm commented Dec 2, 2022

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

The @deprecated directive is supported by this bundle for different GraphQL entities: Types, Objects, Interfaces, Enums.
But not for Inputs for some reason.

@TaProhm TaProhm force-pushed the append-deprecated-for-inputs-fields branch from f8f3118 to 3afaeaa Compare February 7, 2023 14:43
@TaProhm
Copy link
Contributor Author

TaProhm commented Mar 14, 2023

Hi @mcg-web and @Vincz. Could this PR be reviewed, please. The change is relatively small, but rather important for everyday work.

@Vincz
Copy link
Collaborator

Vincz commented Mar 14, 2023

Hi @TaProhm, sorry for the late reply.
Would you mind to update this line :

], self::getDescriptionConfiguration(static::getMetadatas($reflectionClass)));
to pass true as the second argument of getDescriptionConfiguration.

Can you also add tests? (just to ensure that it works when we add the directive in yaml or with annotations/attributes)

@TaProhm TaProhm changed the title Append @deprecated directive fot Input's fields Append @deprecated directive for Input's fields Mar 14, 2023
@TaProhm
Copy link
Contributor Author

TaProhm commented Mar 15, 2023

@Vincz Thank you for pointing out in the right direction. As a result I stuck with" Overblog\GraphQLBundle\Tests\Functional\Type\DefinitionTest" for InputObjectType. It turned out there is an issue with webonyx/graphql-php regarding input values deprecation webonyx/graphql-php#110
I will amend this PR with tests as soon as it will be possible.

@Vincz
Copy link
Collaborator

Vincz commented May 25, 2023

Hi @TaProhm, it seems the issue in webonyx has been fixed: webonyx/graphql-php#110
:)

@Vincz Vincz mentioned this pull request May 29, 2023
@TaProhm
Copy link
Contributor Author

TaProhm commented Jun 7, 2023

Hi @Vincz

It's only now that I've been able to give a detailed answer. I contributed to webonyx/graphql-php/issues/110 during my vacation, and then I was going to finish this PR. But now there is not enough time. However, this functionality is rather necessary, so I plan to finish it as soon as I can.

@TaProhm TaProhm closed this Jun 12, 2023
@TaProhm TaProhm force-pushed the append-deprecated-for-inputs-fields branch from b40f183 to 10d2ce4 Compare June 12, 2023 14:36
@TaProhm
Copy link
Contributor Author

TaProhm commented Jun 12, 2023

@Vincz, I have updated this PR with actual commit containing new code and tests. It is ready to be reviewed.

@TaProhm TaProhm reopened this Jun 12, 2023
@TaProhm TaProhm changed the title Append @deprecated directive for Input's fields Allow deprecating input fields and arguments (InputObjectType) Jun 12, 2023
@Vincz Vincz merged commit 7687071 into overblog:master Jun 14, 2023
42 checks passed
@Vincz
Copy link
Collaborator

Vincz commented Jun 14, 2023

Awesome @TaProhm! Thank you very much for this :)

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.

None yet

2 participants