Skip to content

Conversation

thomaschaplin
Copy link
Member

This is to address some comments made in #48 about lack of subscription support.

This pull request adds comprehensive support and documentation for GraphQL subscriptions to the graphQlQueryToJson library, along with extensive test coverage and clarification of current limitations. The most important changes are grouped below:

Subscription Support and Documentation:

  • Added a new section to the README.md with usage examples for GraphQL subscriptions, including basic subscriptions, subscriptions with variables/arguments, aliases, and enums. The API reference was updated to clarify that the query parameter now accepts subscription strings.
  • Added a "Limitations" section to the documentation detailing unsupported features such as named and inline fragments, and the handling of directives (parsed but ignored).

Test Coverage:

  • Added a new describe("Subscriptions", ...) block to src/test/full_functionality.spec.ts with thorough test cases covering simple subscriptions, arguments, aliases, enums, nested objects, directives, and error handling for unsupported fragments.
  • Added corresponding subscription example tests to src/test/readme_examples.spec.ts to ensure README examples are validated by tests.

Minor Improvements:

  • Added an ESLint directive to suppress console warnings in scripts/updateTestCoverage.js.

@thomaschaplin thomaschaplin self-assigned this Aug 20, 2025
@thomaschaplin thomaschaplin requested a review from a team as a code owner August 20, 2025 12:45
@TrayProd TrayProd changed the title subscription support [EE-3024] subscription support Aug 20, 2025
@thomaschaplin thomaschaplin mentioned this pull request Aug 20, 2025
@thomaschaplin thomaschaplin changed the title [EE-3024] subscription support [EE-3024] subscription support evidence Aug 20, 2025
Copy link
Contributor

@rickschubert rickschubert left a comment

Choose a reason for hiding this comment

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

Great!

Do you think it would be okay to merge my PR in first though? I don't have access to that fancy AI, meaning my workflow is a lot more manual. I have a couple of changes in that PR which might affect your PR -- I assume it would be easy on your end but harder for me 😬

@thomaschaplin
Copy link
Member Author

@rickschubert please re-review

@thomaschaplin thomaschaplin merged commit 490173c into master Aug 26, 2025
6 checks passed
@thomaschaplin thomaschaplin deleted the thomas-chaplin/EE-3024/subscription-support branch August 26, 2025 15:10
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