Skip to content

[GraphQL] Resolver Stages #2959

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

Merged

Conversation

alanpoulain
Copy link
Member

@alanpoulain alanpoulain commented Jul 28, 2019

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #1904
License MIT
Doc PR

This PR introduces Stages for the Resolvers.

They are the counterpart of the EventListeners in REST.

Each Stage can be decorated in order to have more control in the Resolver flow.

The Stages are:

  • ReadStage
  • DeserializeStage
  • ValidateStage
  • DenyAccessStage
  • WriteStage
  • SerializeStage

This PR also introduce a SerializerContextBuilder in order to be able to control the serialization in the Resolvers.

@alanpoulain alanpoulain force-pushed the graphql-resolver-stages branch 5 times, most recently from dfd9b02 to 99d12b7 Compare August 4, 2019 10:36
@alanpoulain alanpoulain marked this pull request as ready for review August 4, 2019 11:19
@alanpoulain alanpoulain force-pushed the graphql-resolver-stages branch from 99d12b7 to 9ed4255 Compare August 4, 2019 11:27
@alanpoulain alanpoulain force-pushed the graphql-resolver-stages branch from 9ed4255 to 60c1512 Compare August 4, 2019 12:05
@alanpoulain
Copy link
Member Author

alanpoulain commented Aug 4, 2019

The error in AppVeyor is related to: symfony/symfony#32890.
It seems this line is causing an issue: https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Console/Output/StreamOutput.php#L106.
But we can't see why.

SymfonyInsight seems to have some issues with Draft PR.

@alanpoulain alanpoulain merged commit cfa8f34 into api-platform:master Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant