feat: gql_builder module, LayrzConnector migration, and v3.8.0 release#180
Merged
Conversation
…tion to LayrzChart - Added List<Asset>? assets, List<String>? assetsIds and bool? enableLttb to LayrzChart (freezed) - Added @default([]) List<String> assetsIds and @default(true) bool enableLttb to LayrzChartInput - Split LayrzChartInput into its own part file (src/chart_input.dart) mirroring Locator layout - Added fetch, fetchAll, fetchAllLight, delete, deleteMultiple methods to LayrzChart - Added save method to LayrzChartInput - Added graphqlFragment, fetchSingleQuery, fetchAllGraphqlQuery, fetchAllLightGraphqlQuery, deleteGraphqlMutation, addGraphqlMutation, editGraphqlMutation string getters Co-Authored-By: Claude <claude@anthropic.com>
- Ported gql_builder (GqlVariable, GqlField, GqlFragment, GqlQuery, GqlMutation) into lib/src/api/src/gql_builder/ - Extended GqlVariable with list type (nestedRequired for [ID]! vs [ID!]!), input type (inputName), and withValue() for runtime binding - Added args: Map<String,String> to GqlField for field-level arguments - Moved LayrzConnector from lib/src/utils/ into lib/src/api/, updating perform() to accept a Gql object instead of raw query strings - Updated api.dart, utils.dart, and three library headers accordingly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaced hardcoded GraphQL string getters (graphqlFragment, fetchAllGraphqlQuery, addGraphqlMutation, etc.) with inline GqlQuery / GqlMutation builder calls across all 12 model files: - Access / AccessInput (id and uuid variants) - RegisteredApp - LayrzChart / LayrzChartInput - Locator / LocatorInput (including cross-model fragment composition) - MapLayer / MapLayerInput - Poi / PoiInput - Token - User Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extracted the repeated dynamicAvatar field set (type, url, icon, emoji, base64) into Avatar.gqlFragment so callers reference it via fragment spread rather than inlining five fields each time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…me flag - Replace explicit fragments list with runtime collection via _collectFragments() that recursively walks the field tree and deduplicates by fragment name - Add includeTypename flag (default false) to control __typename injection - Fix GqlMutation/GqlQuery usage across all callers (delete ops, mutations) - Remove unused explicit imports in migrated model files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📋 Changelog SummaryThis PR includes the following changes: ✨ Features
♻️ Refactoring
🤖 Auto-generated by changelog workflow |
📊 Test Coverage Report🎯 Dart/Flutter
🤖 Generated by coverage workflow |
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.
📋 Summary
gql_buildermodule for type-safe GraphQL query/mutation constructionLayrzConnectorinto theapi/module and switches all callers to the new builderassets,assetsIds, andenableLttbfields toLayrzChart/LayrzChartInput3.8.0✨ Features
gql_builderprimitives:GqlQuery,GqlMutation,GqlFragment,GqlField,GqlVariableGqlVariableType.listwithlistOf+nestedRequiredfor[ID]!and[ID!]!variantsGqlVariableType.inputwithinputNamefor GraphQL input object typesGqlField.argsfor field-level argument rendering (e.g.charts(apiToken: $apiToken))Avatar.gqlFragmentreusable fragment, used inUserandLocatorfragmentsfragments:list neededassets,assetsIds, andenableLttbtoLayrzChartandLayrzChartInput♻️ Refactor
LayrzConnectorfromlib/src/utils/intolib/src/api/; still reachable via the top-level barrelLayrzConnector.perform(Gql)replaces the raw-stringperform(query:, variables:)methodLayrzChart,LayrzChartInput,Access,User,Locator,LocatorInput,MapLayer,MapLayerInput,Poi,PoiInput,Token,RegisteredApp🔧 Chore / Config
3.8.0and updatedCHANGELOG.md🤖 Generated with Claude Code