Skip to content

Commit

Permalink
fix(ferry_generator): fix external schema detection
Browse files Browse the repository at this point in the history
  • Loading branch information
knaeckeKami committed Jul 26, 2024
1 parent 1d5108e commit 6e0ed54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/ferry_generator/lib/serializer_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ class SerializerBuilder implements Builder {
// if the schema is defined in a different package
// we need to import the serializers from that package
// and add them to the serializers of this package
final isExternalSchema = schemaId != buildStep.inputId;
final isExternalSchema = schemaId.package != buildStep.inputId.package;

final externalSerializersExpression = isExternalSchema
? refer('serializers',
_externalSchemaSerializersImport(schemaId, config))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/ferry_test_graphql2/test/fetch_policy_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:ferry_exec/ferry_exec.dart';
import 'package:ferry_test_graphql2/schema/__generated__/serializers.gql.dart';
import 'package:test/test.dart';
import 'package:ferry_test_graphql2/queries/__generated__/reviews.req.gql.dart';

Expand Down

0 comments on commit 6e0ed54

Please sign in to comment.