Repository navigation
Schema docs, unknown enum fallback, duplicate operation checks - #3
Merged
Merged
Conversation
- Schema descriptions become doc comments; @deprecated is noted there, and becomes a Dart @deprecated with the new deprecated_annotations option - unknown_enum_fallback option adds a $unknown value that unknown server values parse to (also in lists) instead of throwing - BLD104 for duplicate operation names within or across documents and for names mapping to the same output file; operation files record their source - Unknown config keys are logged as warnings with a suggestion - Fix: enum lists with escaped values (e.g. `default`) failed to parse; escaped values now carry @jsonvalue - Fix: index.dart usage hint shows the real package: URI - Deprecate public helpers the generator no longer uses (removal in 3.0) - Compile test fails on analyzer infos/warnings in generated code
Merged
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.
Non-breaking improvements for 2.1.0.
Added
@deprecatedis noted there asDeprecated: <reason>deprecated_annotationsoption: emit Dart@Deprecated(opt-in, because json_serializable'stypes.g.dartthen triggersdeprecated_member_use_from_same_package, which failsflutter analyze)unknown_enum_fallbackoption: enums get a$unknownvalue that unknown server values parse to, also in lists (opt-in, because the extra value makes existing exhaustive switches incomplete)BLD104: duplicate operation names in one document, across documents, or names mapping to the same output file. Operation files record their source in a// Source:line, so regenerating or moving an operation doesn't trigger false positivesgraphql_codegen.yamlare logged as warnings with a "did you mean" suggestionFixed
[Role!]containingdefault) failed to parse, because json_serializable's enum map only knew the Dart names. Escaped values now carry@JsonValueindex.dartusage hint showed an invalidpackage:your_app/lib/...importDeprecated
Tests