artemis 5.0.1
artemis: ^5.0.1 copied to clipboard
Build dart types from GraphQL schemas and queries (using Introspection Query).
CHANGELOG #
5.0.1 #
- Fix generation of recursive input objects introduced by 5.0.0.
5.0.0 #
MAJOR BREAKING CHANGE
In this version we moved from json to graphql (SDL) schema parsing.
This allowed us to get rid off ±1200 lines of code which makes the
project support much easier. The test files with schema definitions
became more clear and human readable.
If you already have your schema in SDL format, just point to it in build.yaml.
If not, use this snippet
(from this Apollo article) or online helpers like
this one to convert from one to another.
4.0.2 #
- Only add unknownEnumValue on non-list enums
- Consider all classes to include reference to meta package
4.0.1 #
- Look at mutation root when generating a mutation
4.0.0 #
MAJOR BREAKING CHANGE
This version completely refactors how Artemis generate code (by finally
using the implementation of visitor pattern provided by gql). On top of that,
I've decided to do other major breaking changes to make code cleaner and more
maintainable. Listed:
add_query_prefixdoesn't exist anymore (it's now the default to generate classes with its "path" from the query), e.g., this query'scityfield will be typed asCityName$QueryRoot$User$Address$City:
This change was also done to tip users to NOT use those generated queries directly on their code, to avoid coupling them to your business logic.query city_name { user { address { city { name } } } }custom_parser_importwas moved to inside a ScalarMap, anduse_custom_parserwas removed.resolve_type_fieldoption was renamed totype_name_field, as__typenameis the correct field name (by GraphQL spec).- Classes generated for mutation will have a
Mutationsuffix, as queries already haveQuerysuffix. - Change pre-generation data classes constructors to named parameters, so if
you're using
GraphQLQueryBuilder.onBuild, it will break.
And also:
- Add more logs and errors while generating code, to help debugging.
- Add more/refactor tests.
- Add a GitHub example.
TODO:
- ❌ re-add more logs
- ❌ clean options (?)
- ❌ prefix every class with
$(?) - ❌ refactor class naming variables
- ❌ review readme and changelog
3.2.1 #
- Fix unknown enum: add prefix
3.2.0 #
- Make enums loose. When unknown values are provided into an enum, it will fall back to a custom
ARTEMIS_UNKNOWNvalue avoiding breaking/crashing the client.
3.1.0 #
- Allow to dispose
ArtemisClientunderlining http client when possible
2.2.2 #
- Make lists as input objects work again
2.2.1 #
- Display error on types not found on schema
2.2.0+1 #
- Add "Articles and videos" category on README
2.1.4 #
- Add missing prefix to generated enums
2.1.3 #
- Bump equatable/gql suite, refine GitHub actions
2.1.2 #
- Bump json_serializable/json_annotation
2.1.1 #
- Properly consider Union types on generation
2.1.0+1 #
- Fix GitHub actions deploy pipeline
- Make sure artemis depends on json_annotation
2.1.0 #
- Generate fragments as mixins
2.0.7+1 #
- README updates
2.0.7 #
- Add missing prefix to interfaces
2.0.6 #
- Perserve the query name casing
2.0.5 #
- Bump
gqlpackage
2.0.4 #
- Bump
gqlpackage
2.0.3 #
- Generate every field of input objects
2.0.2 #
- Support
__schemakey under the data field or on root ofschema.json.
2.0.1 #
- Loosen up dependencies to make it work again with Flutter
betachannel
2.0.0 #
- BREAKING: move
GraphQLErrortopackage:gql. If you don't use it, or just reference it indirectly, it will not be breaking, but a major will be bumped anyway, just for sure. - Upgrade
package:gqlto version0.7.4 - Build GQL AST into generated Dart code instead of the raw string
- Use
Linkfrompackage:gql/linkas the execution interface ofArtemisClient - Use
package:gql_dedupe_linkandpackage:gql_http_linkas the default links
1.0.4 #
- Add a test to guarantee query inputs can be lists
1.0.3 #
- Disable implicit casts
- Avoid double-parsing the source string
1.0.2 #
- Differentiate lists from named types when looping through variables
- Consider nullable operation name when defining query name
1.0.1 #
- Upgrade
gqlto version0.2.0to get rid of direct dependency onsource_spanand for better parsing errors. - Filter for
SchemaMapwithoutputwhen generating code
1.0.0 #
- Breaking: Add required
outputoption toSchemaMap - Make Artemis a
$lib$synthetic generator - Add
add_query_prefixoption toSchemaMap
0.7.0 #
- Make generated classes a mixin of
Equatable, meaning they can be easily comparable with==
0.6.1 #
- Include pubspec.lock files of examples
0.6.0 #
- Replace
graphql_parserwithgqlpackage
0.5.1 #
- Add most documentation
- Increase pana grade (health and maintenance)
- Fix some stuff related to importing http on client
0.5.0 #
- Start using
code_builderto better generate Dart code
0.4.0 #
- Allow scalar mappings to include imports for types
0.3.2 #
- Decode HTTP response as UTF-8 on execute helper.
0.3.1 #
- Export common used files on default package route (
package:artemis/artemis.dart) - Use single schemaMap globbing stream to make sure only one schema will be found
- Add missing changelog
- Test new github actions
0.3.0 BREAKING #
- Add new generators to GraphQLQuery and QueryArguments
- Fix toJson() on JsonSerializable classes (for nested entities)
- [BREAKING] Remove the
execute*functions generations, to use instead the genericArtemisClientclass that should receive a GraphQLQuery generated subclass.
0.2.1 #
Set HTTP headers only when using default HTTP client.
0.2.0 BREAKING #
Completely overhaul how this works.
Artemis won't generate a full schema typing anymore. Instead, it will use the schema to generate typings from a specific query or mutation. It will also create helper functions to execute those queries. See README for more info.
This is totally a breaking change but as this library is still on alpha, I should keep it under 1.0.
0.1.3 #
- Make objects that implement interfaces override resolveType
0.1.2 #
- Improve package score
0.1.1 #
- Enable tests on pipeline
0.1.0 #
- "Fix" json_serializable dependency
- Add tests
- Generate union types as inheritance
- Generate interface types as implementation
- Make generated code choose inheritance
0.0.1 #
- First release
- No tests
- No documentation
- Parse complex GraphQL schemas (incorrectly, now I know)
- Parse all GraphQL types types (union, interface, enum, input object, object, scalar, list, non null)
- Consider custom scalars
- Not even compile from scratch
- Lot of bugs