Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added IsPublic support to InputObject #1108

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

Open
vladdnepr wants to merge 11 commits into overblog:master
base: master
Choose a base branch
Loading
from vladdnepr:master

Conversation

Copy link

@vladdnepr vladdnepr commented Mar 11, 2023

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

Added IsPublic support to InputObject

Tested locally, works fine

Copy link
Collaborator

Vincz commented May 3, 2023

Hi @vladdnepr
Can you elaborate on this?
The Input Object describe objects used by the client to send a query or mutation. There is no access management of this.
What are you trying to achieve?

Copy link
Author

I did access control for admin area via public feature.

I need to control inputs, queries, mutations and types. Frontend received schema and can recognize what enabled and what not.

Queries, mutations and types supports IsPublic, but inputs not

Copy link
Collaborator

Vincz commented May 3, 2023

@vladdnepr Ok, I see the use case.
Did you check if it's supported by the bundle and the filtering is properly called (PublicFieldsFilterConfigProcessor.php)
We would also need a couple of tests for this.
Thanks!

Copy link
Author

I will check it soon....

Copy link
Author

vladdnepr commented May 4, 2023
edited
Loading

Did you check if it's supported by the bundle and the filtering is properly called (PublicFieldsFilterConfigProcessor.php)

Yes

Снимок экрана 2023年05月04日 в 11 44 51

Снимок экрана 2023年05月04日 в 11 45 03

Copy link
Collaborator

Vincz commented May 4, 2023

@vladdnepr Ok great! Can you add a bunch of tests? Thank again!

Copy link
Author

Copy link
Author

vladdnepr commented May 4, 2023
edited
Loading

What tests are you expected?

src/Config/Parser/MetadataParser/MetadataParser.php

I did change in private method, which called with another private inputMetadataToGQLConfiguration, which called with private classMetadatasToGQLConfiguration, which called with processFile

image

src/Config/InputObjectTypeDefinition.php

I do not see any tests for this file

Снимок экрана 2023年05月04日 в 12 35 44

Copy link
Author

@Vincz up

Copy link
Collaborator

Vincz commented May 27, 2023

Hi @vladdnepr! The tests are now running and I updated your PR on the latest changes.
The tests we are expecting should be added in tests/Functional/App/config/public.
You just need to add an input object in the config and check that the public is correctly handled in Overblog\GraphQLBundle\Tests\Functional\Generator\TypeGeneratorTest (see the first two methods for inspiration).

@Vincz Vincz mentioned this pull request May 29, 2023
@Vincz Vincz mentioned this pull request Jul 7, 2023
Copy link
Author

Sorry, but now I don't have free time for this issue, maybe later I will add tests.

Maybe we release this issue later in another release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /