Skip to content

Commit 8caa265

Browse files
authored
1 parent c481644 commit 8caa265

13 files changed

Lines changed: 999 additions & 17 deletions

File tree

.github/workflows/check_pr.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
with:
3030
channel: stable
3131
- name: Activate melos
32-
run: dart pub global activate melos 2.9.0
32+
run: |
33+
dart pub get
34+
dart pub global activate melos
3335
- name: Validate publish
3436
run: melos publish --dry-run --yes | tee ./out
3537
- name: Test if changed
@@ -58,7 +60,9 @@ jobs:
5860
with:
5961
channel: ${{ matrix.channel }}
6062
- name: Activate melos
61-
run: dart pub global activate melos 2.9.0
63+
run: |
64+
dart pub get
65+
dart pub global activate melos
6266
- name: Bootstrap melos
6367
run: melos bs
6468
- name: Analyze package
@@ -80,7 +84,9 @@ jobs:
8084
with:
8185
channel: ${{ matrix.channel }}
8286
- name: Activate melos
83-
run: dart pub global activate melos 2.9.0
87+
run: |
88+
dart pub get
89+
dart pub global activate melos
8490
- name: Bootstrap melos
8591
run: melos bs
8692
- name: Build dart
@@ -107,7 +113,9 @@ jobs:
107113
with:
108114
channel: ${{ matrix.channel }}
109115
- name: Activate melos
110-
run: dart pub global activate melos 2.9.0
116+
run: |
117+
dart pub get
118+
dart pub global activate melos
111119
- name: Bootstrap melos
112120
run: melos bs
113121
- name: Run tests dart

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ jobs:
1313
with:
1414
channel: stable
1515
- name: Activate melos
16-
run: dart pub global activate melos 2.9.0
16+
run: |
17+
dart pub get
18+
dart pub global activate melos
1719
- name: Login pub
1820
run: |
1921
mkdir -p "$XDG_CONFIG_HOME/dart/"
2022
echo "${{ secrets.PUB_CREDENTIALS}}" | base64 -d > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
2123
- name: Validate publish
22-
run: melos publish --dry-run --yes
24+
run: dart run melos publish --dry-run --yes
2325
- name: Publish
24-
run: melos publish --no-dry-run --yes
26+
run: dart run melos publish --no-dry-run --yes

melos.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ scripts:
88
run: melos exec -- "dart analyze --fatal-infos ."
99
test_dart:
1010
exec: dart test
11-
select-package:
11+
packageFilters:
1212
flutter: false
13-
dir-exists: "test"
13+
dirExists: "test"
1414
test_flutter:
1515
exec: flutter test
16-
select-package:
16+
packageFilters:
1717
flutter: true
18-
dir-exists: "test"
18+
dirExists: "test"
1919
build_dart:
2020
exec: dart run build_runner build --delete-conflicting-outputs
21-
select-package:
21+
packageFilters:
2222
flutter: false
2323
build_flutter:
2424
exec: flutter pub run build_runner build --delete-conflicting-outputs
25-
select-package:
25+
packageFilters:
2626
flutter: true
2727
format:
2828
exec: dart format

packages/graphql_codegen/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.13.11
2+
3+
- Fix bug on bad type extension.
4+
15
# 0.13.10
26

37
- Support enum value names starting with `_`.

packages/graphql_codegen/example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ packages:
337337
path: ".."
338338
relative: true
339339
source: path
340-
version: "0.13.10"
340+
version: "0.13.11"
341341
graphql_flutter:
342342
dependency: "direct main"
343343
description:

packages/graphql_codegen/lib/src/context/schema.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ class Schema<TKey extends Object> {
313313
...node.fields,
314314
...definitions
315315
.whereType<ObjectTypeExtensionNode>()
316+
.where((element) => element.name.value == node.name.value)
316317
.expand((element) => element.fields)
317318
];
318319
}
@@ -324,6 +325,7 @@ class Schema<TKey extends Object> {
324325
...node.fields,
325326
...definitions
326327
.whereType<InterfaceTypeExtensionNode>()
328+
.where((element) => element.name.value == node.name.value)
327329
.expand((element) => element.fields)
328330
];
329331
}

packages/graphql_codegen/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: |
33
Simple, opinionated, codegen library for GraphQL. It allows you to
44
generate serializers and client helpers to easily call and parse your data.
55
6-
version: 0.13.10
6+
version: 0.13.11
77
homepage: https://github.com/heftapp/graphql_codegen/tree/main/packages/graphql_codegen
88
repository: https://github.com/heftapp/graphql_codegen/tree/main/packages/graphql_codegen
99

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# query.graphql
2+
type Query {
3+
}
4+
5+
# (1)
6+
extend type Query {
7+
foo: FooResponse!
8+
}
9+
10+
type FooResponse {
11+
foo: FooCore!
12+
}
13+
14+
type FooCore {
15+
bar: String!
16+
}
17+
18+
query FooQuery {
19+
foo {
20+
# (2)
21+
foo {
22+
# (3)
23+
bar
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)