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

Integrate laragraph/utils RequestParser #739

Merged
merged 9 commits into from
Apr 11, 2021
Merged

Integrate laragraph/utils RequestParser #739

merged 9 commits into from
Apr 11, 2021

Conversation

mfn
Copy link
Collaborator

@mfn mfn commented Apr 10, 2021

Summary

Breaking changes

  • batched queries will only work with POST requests
    This is due to RequestParser using \GraphQL\Server\Helper::parseRequestParams which includes this check
  • Drop support for configuration the name of the variable for the variables
    (Replaces Drop support for configuration the name of the variable for the variables #734)
  • GraphQLUploadMiddleware has been removed (RequestParser removes the requirement for it)
  • Empty GraphQL queries now return a proper validated GraphQL error
  • Signature changes In \Rebing\GraphQL\GraphQLController:
    • old: protected function executeQuery(string $schema, array $input): array
      new: protected function executeQuery(string $schema, OperationParams $params): array
    • old: protected function queryContext(string $query, ?array $params, string $schema)
      new: protected function queryContext(string $query, ?array $variables, string $schema)
    • old: protected function handleAutomaticPersistQueries(string $schemaName, array $input): string
      new: protected function handleAutomaticPersistQueries(string $schemaName, OperationParams $operation): string

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Misc. change (internal, infrastructure, maintenance, etc.)

Checklist:

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

mfn added 4 commits April 11, 2021 22:23
- simplified handling of the request and streamline passed data via
  OperationParams
- added unified error reporting via validateOperationParams
- replaced existing manual code for GraphQLUploadMiddleware
@mfn mfn merged commit 8c61b5b into master Apr 11, 2021
@mfn mfn deleted the mfn-utils-v2 branch April 11, 2021 20:31
mfn added a commit that referenced this pull request Apr 17, 2021
@mfn mfn mentioned this pull request May 20, 2021
Closed
believe2world added a commit to believe2world/graphql_admin_laravel that referenced this pull request Apr 6, 2023
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.

Consider laragraph/laravel-graphql-utils
1 participant