Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance schemaExtensions to Support Both Files and Directories #4859

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sverrejoh
Copy link
Contributor

Summary

This update enhances the behavior of the "schemaExtensions" configuration key, allowing it to specify either:

  • A folder containing GraphQL schema extension files (as originally documented).
  • A specific .graphql schema extension file (new functionality).

This change unifies behavior between the Watchman query and the walkdir implementation, ensuring consistent handling of schema extensions regardless of configuration.

Details

Previously, the Relay documentation instructed users to configure "schemaExtensions" with a folder path containing the GraphQL schema extensions. However:
• Relay did not enforce that the target was a folder.
• Users could already specify a single .graphql schema extension file directly and it would work when not using Watchman.

This update ensures both approaches work seamlessly with Watchman and enhancing flexibility. The documentation has also been updated to reflect this new functionality.

Why This Change?

This improvement resolves an inconsistency between Watchman and non-Watchman setups, offering better support for varying project configurations without breaking existing workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants