Skip to content

Conversation

Kingdutch
Copy link
Contributor

This adds detection of leaked cacheability metadata to assertResults and assertErrors
in the QueryResultAssertionTrait.

The context is serialized in the error message because this is always possible and while
serialized content isn't the most readable it provides the most robust method of easily
showing what metadata was leaked.

Fixes #1206

Kingdutch and others added 2 commits May 25, 2021 10:22
This adds detection of leaked cacheability metadata to assertResults and assertErrors
in the QueryResultAssertionTrait.

The context is serialized in the error message because this is always possible and while
serialized content isn't the most readable it provides the most robust method of easily 
showing what metadata was leaked.

Fixes drupal-graphql#1206
@klausi klausi merged commit 6961eac into drupal-graphql:8.x-4.x Jul 3, 2021
@klausi
Copy link
Contributor

klausi commented Jul 3, 2021

Makes sense to me, thanks!

chrfritsch added a commit to chrfritsch/graphql that referenced this pull request Nov 24, 2021
* 8.x-4.x:
  fix(dataproducer): Fix language definition to be single value in entity reference producers (drupal-graphql#1241)
  docs(server): Improved class property descriptions
  feat(server): Add configurable validation security rules for introspection and query complexity (drupal-graphql#1244)
  tests(buffer): Fix ArryObject usage to not depend on Zend (drupal-graphql#1247)
  test(phpstan): Add missing return type hint
  fix(file-upldoad): Validate files in the correct order
  fix(DataProducer): Fix entity reference loading by language (drupal-graphql#1232)
  tests(assertions): Implement leaked metadata detection for QueryResultAssertionTrait (drupal-graphql#1207)
  tests(github): Switch testing to Drupal core 9.2.x (drupal-graphql#1215)
  chore(voyager): yarn audit security updates (drupal-graphql#1214)
  test(phpstan): Enable PHPStan run on PHP 8.0 (drupal-graphql#1211)
  refactor(executor): Replace deprecated AST::getOperation() with AST::getOperationAST() (drupal-graphql#1210)
  fix(executor): Remove swapped errors compatibility mode
klausi pushed a commit to klausi/graphql that referenced this pull request Sep 21, 2023
…tAssertionTrait (drupal-graphql#1207)

This adds detection of leaked cacheability metadata to assertResults and assertErrors
in the QueryResultAssertionTrait.

The context is serialized in the error message because this is always possible and while
serialized content isn't the most readable it provides the most robust method of easily 
showing what metadata was leaked.

Fixes drupal-graphql#1206
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.

[4.x] Test that no cacheability metadata is leaked in QueryResultAssertionTrait::assertResults

2 participants