Skip to content

Conversation

@kmaschi
Copy link
Member

@kmaschi kmaschi commented Aug 1, 2025

Description

GraphQL mesh includes different properties in hooks based on which type of merger is being used. When a single source onFetch does not have operation data leading to errors in hooks. When multiple sources it does.

  • Resolves comments in epic/new hooks.
  • This fix aims to resolve inconsistencies and provide a uniform/predictable payload to hooks.
    • beforeAll
      • document
      • context
        • request: Request
        • params: GraphQLParams
        • body?: unknown
        • headers?: Record<string, string>
        • secrets?: Record<string, string>
        • state?: StateApi
        • logger?: YogaLogger
    • beforeSource
      • request (to source)
      • sourceName
      • document
      • context
        • request: Request
        • params: GraphQLParams
        • headers?: Record<string, string>
        • secrets?: Record<string, string>
        • state?: StateApi
        • logger?: YogaLogger
    • afterSource
      • response (from source)
      • setResponse
      • sourceName
      • document
      • context
        • request: Request
        • params: GraphQLParams
        • headers?: Record<string, string>
        • secrets?: Record<string, string>
        • state?: StateApi
        • logger?: YogaLogger
    • afterAll
      • result
      • document
      • context
        • request: Request
        • params: GraphQLParams
        • body?: unknown
        • headers?: Record<string, string>
        • secrets?: Record<string, string>
        • state?: StateApi
        • logger?: YogaLogger
  • Do not sent unserializable objects to remote hook
    • no state api
    • no logger
    • no secrets

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • 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 change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Kristopher Maschi added 6 commits July 31, 2025 18:15
Copy link

@amolina-adobe amolina-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kmaschi kmaschi merged commit bbf8498 into epic/ts-migration Aug 3, 2025
3 checks passed
@kmaschi kmaschi deleted the chore/plugin-hooks-fixes branch August 3, 2025 16:26
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.

3 participants