Skip to content

Commit

Permalink
Update build_runner version and API in pokemon example
Browse files Browse the repository at this point in the history
The old API was down and it was moved to this new endpoint lucasbento/graphql-pokemon#14
Also updates build_runner version to avoid incompatible version with artemis
  • Loading branch information
tuannyharumi committed Jun 18, 2021
1 parent a9e918f commit 047e517
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 28 deletions.
6 changes: 3 additions & 3 deletions example/pokemon/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'graphql/simple_query.dart';

Future<void> main() async {
final client = ArtemisClient(
'https://graphql-pokemon.now.sh/graphql',
'https://graphql-pokemon2.vercel.app',
);

final simpleQuery = SimpleQueryQuery();
Expand All @@ -21,9 +21,9 @@ Future<void> main() async {
final bigQueryResponse = await client.execute(bigQuery);
client.dispose();

print('Simple query response: ${simpleQueryResponse.data.pokemon.number}');
print('Simple query response: ${simpleQueryResponse.data?.pokemon?.number}');

for (final pokemon in bigQueryResponse.data.pokemons) {
for (final pokemon in bigQueryResponse.data?.pokemons ?? []) {
print('#${pokemon.number}: ${pokemon.name}');
}
}
55 changes: 31 additions & 24 deletions example/pokemon/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "20.0.0"
version: "22.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "1.7.1"
args:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
path: "../.."
relative: true
source: path
version: "7.0.0-beta.3.3"
version: "7.0.0-beta.13"
async:
dependency: transitive
description:
Expand All @@ -49,42 +49,42 @@ packages:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.2"
build_config:
dependency: transitive
description:
name: build_config
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.7"
version: "1.0.0"
build_daemon:
dependency: transitive
description:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.10"
version: "3.0.0"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.3"
build_runner:
dependency: "direct dev"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "1.12.2"
version: "2.0.4"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.12"
version: "7.0.0"
built_collection:
dependency: transitive
description:
Expand All @@ -98,7 +98,7 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.0.4"
version: "8.0.6"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -126,7 +126,7 @@ packages:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "3.7.0"
version: "4.0.0"
collection:
dependency: transitive
description:
Expand Down Expand Up @@ -161,14 +161,14 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.1"
equatable:
dependency: transitive
description:
name: equatable
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.3"
file:
dependency: transitive
description:
Expand All @@ -183,6 +183,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
glob:
dependency: transitive
description:
Expand All @@ -196,56 +203,56 @@ packages:
name: gql
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.0-nullsafety.2"
version: "0.13.0"
gql_code_builder:
dependency: transitive
description:
name: gql_code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0-nullsafety.0"
version: "0.2.0"
gql_dedupe_link:
dependency: transitive
description:
name: gql_dedupe_link
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety.1"
version: "2.0.0"
gql_exec:
dependency: transitive
description:
name: gql_exec
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0-nullsafety.2"
version: "0.3.0"
gql_http_link:
dependency: transitive
description:
name: gql_http_link
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0-nullsafety.1"
version: "0.4.0"
gql_link:
dependency: transitive
description:
name: gql_link
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0-nullsafety.3"
version: "0.4.0"
graphs:
dependency: transitive
description:
name: graphs
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "2.0.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.1"
version: "0.13.3"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -287,7 +294,7 @@ packages:
name: json_serializable
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.1.3"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -371,7 +378,7 @@ packages:
name: recase
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0-nullsafety.0"
version: "4.0.0"
shelf:
dependency: transitive
description:
Expand Down Expand Up @@ -406,7 +413,7 @@ packages:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.2"
source_map_stack_trace:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/pokemon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:

dev_dependencies:
test: ^1.16.8
build_runner: ^1.12.2
build_runner: ^2.0.4
json_serializable: ^4.1.0
artemis:
path: ../../.

0 comments on commit 047e517

Please sign in to comment.