GraphQL config operations#34
Draft
blurrah wants to merge 5 commits into
Draft
Conversation
Add comprehensive documentation file to guide Claude Code and other AI assistants when working with this repository. Includes: - Essential development commands - High-level architecture overview - Core components and design patterns - Environment variables reference 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Implement dynamic tool generation from GraphQL operation files:
- Auto-discover .graphql/.gql files in configurable directory
- Parse operations and extract variable definitions
- Generate MCP tools with proper Zod schema validation
- Support query/mutation/subscription operations
- Add GRAPHQL_DIR environment variable (defaults to ./graphql)
- Include example GraphQL operation files
Operations are registered as tools with pattern: gql-{operation-name}
Mutations respect ALLOW_MUTATIONS setting for security
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace manual file discovery with standard GraphQL Config format:
- Support .graphqlrc.{yml,json} and graphql.config.js files
- Use 'documents' field with glob patterns for operation discovery
- Add multi-project support with namespaced tool names
- Map config fields to existing environment variables for compatibility
- Maintain backward compatibility with GRAPHQL_DIR env var
- Include example config files in multiple formats
Benefits:
- Standard format used by GraphQL ecosystem tools
- Better IDE integration and validation capabilities
- Environment variable interpolation support
- Simplified configuration management
Original introspect-schema and query-graphql tools remain unchanged.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Restructure example files for better organization and package distribution: - Move all examples to examples/ directory - Add .npmignore to exclude examples from npm package - Create comprehensive examples/README.md with usage instructions - Organize configs (YAML, JSON, JS) in examples/config/ - Keep GraphQL operation examples in examples/graphql/ This ensures examples are available in the repository but not distributed in the npm package, reducing package size and keeping production clean. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Environment variables now always take precedence over GraphQL Config files: - Precedence order: Env vars > GraphQL Config > Defaults - Allows temporary overrides without modifying config files - Useful for debugging, testing, and CI/CD pipelines - Follows 12-factor app principles This is cleaner than having two sets of environment variables and matches developer expectations that env vars override file-based configuration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support GQL operations through
graphql-config. WIP and AI generated.Not sure about the precedence yet..