- feat: Introduced method for subscription queries. You can use the
subscriptionmethod to send subscription queries to your GraphQL server. This returns a [Stream] of [SimpleQueryResult] objects, which is a wrapper for the [QueryResult] from graphql dart package.
- fix: Solved a bug related to GraphQLCache
cacheparam that cached all queries and mutations in an unexpected way. Will remove parameter until bug is fixed and feature is implemented completely in the future
- fix (breaking!): Renamed from
SimpleGraphQltoSimpleGraphQLfor consistency and good Dart class naming practices. - feat: added
defaultHeadersparameter toSimpleGraphQLconstructor to set default headers for all queries and mutations. - feat: added
headersInjectionBehaviorparameter toquery()andmutation()methods. It allows you to choose if theheadersparameter should be merged with thedefaultHeadersor override them. - fix: Made
apiUrlparameter optional. It can be set later by assigning a new value to theapiUrlinstance property. - feat: Added
NoUrlExceptionto handle cases whereapiUrlis not set before callingquery()ormutation()methods. - feat: Added
authHeaderKeyandtokenparameters toquery()andmutation()methods. Now you can set theauthHeaderKeyandtokenon a per-request basis. - feat: You can now define your own
GraphQLCacheandhttp.Clientinstances to be used bySimpleGraphQLon every query and mutation call. - feat:
query()andmutation()methods now accept optionalclientparameter to use a customhttp.Clienton a per-request basis. - feat:
authHeaderKeyandtokenparameters can now be set on constructor and/or onquery()andmutation()methods. - refactor:
headerKeyparameter in constructor was marked as deprecated in favor ofauthHeaderKey. It will be removed in future versions. - docs: Documentation update.
- docs: New test examples in
examplefolder.
- Documentation update.
- The package usage have been documented.
- CHANGELOG format fixed.
SimpleGraphQlclass for simplified GraphQL query petitioning.
- Added package exceptions to exports for easier reference.