Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Issue #331 #332

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
with:
channel: stable
- name: Activate melos
run: dart pub global activate melos 2.9.0
run: |
dart pub get
dart pub global activate melos
- name: Validate publish
run: melos publish --dry-run --yes | tee ./out
- name: Test if changed
Expand Down Expand Up @@ -58,7 +60,9 @@ jobs:
with:
channel: ${{ matrix.channel }}
- name: Activate melos
run: dart pub global activate melos 2.9.0
run: |
dart pub get
dart pub global activate melos
- name: Bootstrap melos
run: melos bs
- name: Analyze package
Expand All @@ -80,7 +84,9 @@ jobs:
with:
channel: ${{ matrix.channel }}
- name: Activate melos
run: dart pub global activate melos 2.9.0
run: |
dart pub get
dart pub global activate melos
- name: Bootstrap melos
run: melos bs
- name: Build dart
Expand All @@ -107,7 +113,9 @@ jobs:
with:
channel: ${{ matrix.channel }}
- name: Activate melos
run: dart pub global activate melos 2.9.0
run: |
dart pub get
dart pub global activate melos
- name: Bootstrap melos
run: melos bs
- name: Run tests dart
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ jobs:
with:
channel: stable
- name: Activate melos
run: dart pub global activate melos 2.9.0
run: |
dart pub get
dart pub global activate melos
- name: Login pub
run: |
mkdir -p "$XDG_CONFIG_HOME/dart/"
echo "${{ secrets.PUB_CREDENTIALS}}" | base64 -d > "$XDG_CONFIG_HOME/dart/pub-credentials.json"
- name: Validate publish
run: melos publish --dry-run --yes
run: dart run melos publish --dry-run --yes
- name: Publish
run: melos publish --no-dry-run --yes
run: dart run melos publish --no-dry-run --yes
12 changes: 6 additions & 6 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ scripts:
run: melos exec -- "dart analyze --fatal-infos ."
test_dart:
exec: dart test
select-package:
packageFilters:
flutter: false
dir-exists: "test"
dirExists: "test"
test_flutter:
exec: flutter test
select-package:
packageFilters:
flutter: true
dir-exists: "test"
dirExists: "test"
build_dart:
exec: dart run build_runner build --delete-conflicting-outputs
select-package:
packageFilters:
flutter: false
build_flutter:
exec: flutter pub run build_runner build --delete-conflicting-outputs
select-package:
packageFilters:
flutter: true
format:
exec: dart format
Expand Down
4 changes: 4 additions & 0 deletions packages/graphql_codegen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.13.11

- Fix bug on bad type extension.

# 0.13.10

- Support enum value names starting with `_`.
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql_codegen/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.13.10"
version: "0.13.11"
graphql_flutter:
dependency: "direct main"
description:
Expand Down
2 changes: 2 additions & 0 deletions packages/graphql_codegen/lib/src/context/schema.dart
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ class Schema<TKey extends Object> {
...node.fields,
...definitions
.whereType<ObjectTypeExtensionNode>()
.where((element) => element.name.value == node.name.value)
.expand((element) => element.fields)
];
}
Expand All @@ -324,6 +325,7 @@ class Schema<TKey extends Object> {
...node.fields,
...definitions
.whereType<InterfaceTypeExtensionNode>()
.where((element) => element.name.value == node.name.value)
.expand((element) => element.fields)
];
}
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql_codegen/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: |
Simple, opinionated, codegen library for GraphQL. It allows you to
generate serializers and client helpers to easily call and parse your data.

version: 0.13.10
version: 0.13.11
homepage: https://github.com/heftapp/graphql_codegen/tree/main/packages/graphql_codegen
repository: https://github.com/heftapp/graphql_codegen/tree/main/packages/graphql_codegen

Expand Down
26 changes: 26 additions & 0 deletions packages/graphql_codegen/test/assets/issue_331/document.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# query.graphql
type Query {
}

# (1)
extend type Query {
foo: FooResponse!
}

type FooResponse {
foo: FooCore!
}

type FooCore {
bar: String!
}

query FooQuery {
foo {
# (2)
foo {
# (3)
bar
}
}
}
Loading
Loading