Add enhanced GraphQL filtering for German idioms#76
Closed
Conversation
Co-authored-by: mmanela <304410+mmanela@users.noreply.github.com>
Co-authored-by: mmanela <304410+mmanela@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add a graphql endpoint to allow finding and filtering german idioms
Add enhanced GraphQL filtering for German idioms
Jul 15, 2025
Owner
|
@copilot Can you remove buildModernUsageFilter |
Co-authored-by: mmanela <304410+mmanela@users.noreply.github.com>
Author
Removed |
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.
Overview
This PR adds comprehensive GraphQL filtering capabilities specifically for German idioms, enabling users to find and filter German idioms with advanced criteria beyond the basic text and language filtering.
Problem
The existing GraphQL endpoint only supported basic filtering:
localeparameterGerman language learners and researchers needed more granular filtering options to find relevant idioms based on regional usage, difficulty level, and modern vs. archaic usage.
Solution
Extended the existing
idiomsGraphQL query with a newgermanFilterparameter that provides advanced filtering whenlocale: "de"is specified.New GraphQL Schema
Key Features
Regional Filtering: Filter by German-speaking regions:
"northern"/"southern"- Germany regions"bavarian"- Bavaria region"austrian"- Austria"swiss"- SwitzerlandDifficulty-Based Filtering: Classify idioms by learning difficulty using tag patterns:
BEGINNER: "beginner", "easy", "simple", "basic"INTERMEDIATE: "intermediate", "medium", "common"ADVANCED: "advanced", "difficult", "complex", "archaic", "literary"Content Filtering: Filter by presence of translations and transliterations
Modern Usage Classification: Distinguish modern idioms from archaic ones
Usage Examples
Filter Austrian and Bavarian beginner idioms:
Find modern Swiss German idioms with translations:
Technical Implementation
$and,$in,$ninoperationsFiles Changed
lib/server/schema/idiom.ts- Enhanced GraphQL schemalib/server/dataProvider/idiomDataProvider.ts- Added filtering logiclib/server/resolvers/idiomResolver.ts- Updated resolverlib/server/model/germanIdiomTypes.ts- New type definitionsTesting
Documentation
Added complete documentation with usage examples in
GERMAN_IDIOM_FILTERING.md.This enhancement makes the GraphQL API significantly more useful for German language learning applications, linguistic research, and cultural exploration tools.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.