Skip to content

Commit

Permalink
trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
j4qfrost committed Feb 28, 2024
1 parent 92dfbff commit 39e634e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,12 @@ jobs:
echo '${{ secrets.PUB_CREDENTIALS }}' > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- name: Git config
run: |
cat pubspec.yaml
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Install melos
run: |
cat pubspec.yaml
dart pub global activate melos
- name: Format
run: |
cat pubspec.yaml
dart fix --apply && dart format --fix .
- name: Uptick versions
run: melos sync-version
- name: Changelog
Expand Down
18 changes: 13 additions & 5 deletions packages/core/lib/src/db/query/mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import 'package:conduit_core/src/db/query/page.dart';
import 'package:conduit_core/src/db/query/query.dart';
import 'package:conduit_core/src/db/query/sort_descriptor.dart';

mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceType> {
mixin QueryMixin<InstanceType extends ManagedObject>
implements Query<InstanceType> {
@override
int offset = 0;

Expand Down Expand Up @@ -38,7 +39,10 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy
List<KeyPath>? _propertiesToFetch;

List<KeyPath> get propertiesToFetch =>
_propertiesToFetch ?? entity.defaultProperties!.map((k) => KeyPath(entity.properties[k])).toList();
_propertiesToFetch ??
entity.defaultProperties!
.map((k) => KeyPath(entity.properties[k]))
.toList();

@override
InstanceType get values {
Expand Down Expand Up @@ -98,7 +102,8 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy
T? boundingValue,
}) {
final attribute = entity.identifyAttribute(propertyIdentifier);
pageDescriptor = QueryPage(order, attribute.name, boundingValue: boundingValue);
pageDescriptor =
QueryPage(order, attribute.name, boundingValue: boundingValue);
}

@override
Expand All @@ -120,7 +125,9 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy

if (properties.any(
(kp) => kp.path.any(
(p) => p is ManagedRelationshipDescription && p.relationshipType != ManagedRelationshipType.belongsTo,
(p) =>
p is ManagedRelationshipDescription &&
p.relationshipType != ManagedRelationshipType.belongsTo,
),
)) {
throw ArgumentError(
Expand Down Expand Up @@ -164,7 +171,8 @@ mixin QueryMixin<InstanceType extends ManagedObject> implements Query<InstanceTy
.map((r) => "'${r!.name}'")
.join(", ");

throw StateError("Invalid query construction. This query joins '${fromRelationship.entity.tableName}' "
throw StateError(
"Invalid query construction. This query joins '${fromRelationship.entity.tableName}' "
"with '${fromRelationship.inverse!.entity.tableName}' on property '${fromRelationship.name}'. "
"However, '${fromRelationship.inverse!.entity.tableName}' "
"has also joined '${fromRelationship.entity.tableName}' on this property's inverse "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class FilterController extends ResourceController {
require: ["required"],
reject: ["error"],
)
TestSerializable tm,
TestSerializable tm,
) async {
return Response.ok(tm);
}
Expand All @@ -351,7 +351,7 @@ class FilterListController extends ResourceController {
require: ["required"],
reject: ["error"],
)
List<TestSerializable> tm,
List<TestSerializable> tm,
) async {
return Response.ok(tm);
}
Expand Down

0 comments on commit 39e634e

Please sign in to comment.