Skip to content

Native preview

oierbravo requested to merge native-preview into 1.1.x

Changes in GatsbyMocker:

  • Switched entityRepository with tempStoreFactory. Inspiration from core/modules/node/src/ParamConverter/NodePreviewConverter.php::convert L:35 From my understanding the temp store is specific for the current user web/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php::get L:82

Changes in GraphqlNodePreviewDataResolver:

  • Active language from the node passed to getQueryVariables
  • String replacement
  • uuid setted in a kind of hacky way 😅

Edge case (new node):

  • Getting GraphQL errors for url generation because of the missing nid however it gets correctly the node.
Drupal\static_suite\StaticSuiteUserException: Error on query: The "node" entity cannot have a URI as it does not have an ID GraphQL request (53:5) 52: } 53: url: entityUrl { ^ 54: path in Drupal\static_export_data_resolver_graphql\GraphqlQueryHandler->query() (line 138 of modules/contrib/static_suite/modules/static_export/modules/static_export_data_resolver_graphql/src/GraphqlQueryHandler.php).
Edited by Alberto Silva

Merge request reports

Loading