Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

emaarco
Copy link
Contributor

@emaarco emaarco commented Aug 7, 2025

Closes

Closes #1902

Description

This PR addresses issue #1902 by adding documentation for GraphQlTesterBuilder and enhancing the ResourceDocumentSource class with a new constructor that accepts a single resource.

Changes Made

1. Enhanced ResourceDocumentSource class

  • Added new constructor: ResourceDocumentSource(Resource location) that accepts a single resource location
  • Improved flexibility: Users can now specify a single custom location instead of being limited to the default "graphql/" folder or providing a full list of locations
  • Maintained backward compatibility: All existing constructors remain unchanged

2. Added GraphQlTesterBuilder documentation example

  • Created comprehensive example: Shows how to use GraphQlTesterBuilder with custom document sources
  • Demonstrates key features: Custom document source, error filtering, and response timeout configuration
  • Follows Spring documentation patterns: Uses proper AsciiDoc tags for code inclusion

3. Updated tests

  • Enhanced test coverage: Added tests for the new single resource constructor
  • Maintained existing functionality: All existing tests continue to pass

Additional Notes

This enhancement makes the ResourceDocumentSource more user-friendly by providing a middle ground between the default behavior and full customization. The new constructor is particularly useful for applications that need to specify a custom GraphQL schema location while still using the default file extensions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 7, 2025
@emaarco emaarco changed the title fix: docs for graphQlTester & constructor for documentSource draft: docs for graphQlTester & constructor for documentSource Aug 7, 2025
…r resourceDocumentSource

Signed-off-by: Marco Schaeck <[email protected]>
@emaarco emaarco changed the title draft: docs for graphQlTester & constructor for documentSource fix: docs for graphQlTester & constructor for documentSource Aug 7, 2025
@bclozel bclozel linked an issue Aug 21, 2025 that may be closed by this pull request
@bclozel bclozel added type: documentation A documentation task in: test Issues related to the test module and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 21, 2025
@bclozel bclozel added this to the 2.0.0-M3 milestone Aug 21, 2025
@bclozel bclozel self-assigned this Aug 21, 2025
@bclozel bclozel closed this in 12fcd6c Aug 21, 2025
@bclozel
Copy link
Member

bclozel commented Aug 21, 2025

Thanks @emaarco for your contribution, this has been merged in main.

@emaarco emaarco deleted the fix/1092 branch August 22, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues related to the test module type: documentation A documentation task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify fragment location for GraphQl Tests
3 participants