-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fdc): Upgrade to v1beta endpoint (#13373)
- Loading branch information
Showing
17 changed files
with
151 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
packages/firebase_data_connect/firebase_data_connect/example/lib/generated/seed_movies.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
part of movies; | ||
|
||
class SeedMovies { | ||
String name = "seedMovies"; | ||
SeedMovies({required this.dataConnect}); | ||
|
||
Deserializer<SeedMoviesResponse> dataDeserializer = (String json) => | ||
SeedMoviesResponse.fromJson(jsonDecode(json) as Map<String, dynamic>); | ||
|
||
MutationRef<SeedMoviesResponse, void> ref() { | ||
return dataConnect.mutation( | ||
this.name, dataDeserializer, emptySerializer, null); | ||
} | ||
|
||
FirebaseDataConnect dataConnect; | ||
} | ||
|
||
class SeedMoviesTheMatrix { | ||
late String id; | ||
|
||
SeedMoviesTheMatrix.fromJson(Map<String, dynamic> json) : id = json['id'] {} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
json['id'] = id; | ||
|
||
return json; | ||
} | ||
|
||
SeedMoviesTheMatrix({ | ||
required this.id, | ||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
} | ||
|
||
class SeedMoviesJurassicPark { | ||
late String id; | ||
|
||
SeedMoviesJurassicPark.fromJson(Map<String, dynamic> json) | ||
: id = json['id'] {} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
json['id'] = id; | ||
|
||
return json; | ||
} | ||
|
||
SeedMoviesJurassicPark({ | ||
required this.id, | ||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
} | ||
|
||
class SeedMoviesResponse { | ||
late SeedMoviesTheMatrix the_matrix; | ||
|
||
late SeedMoviesJurassicPark jurassic_park; | ||
|
||
SeedMoviesResponse.fromJson(Map<String, dynamic> json) | ||
: the_matrix = SeedMoviesTheMatrix.fromJson(json['the_matrix']), | ||
jurassic_park = | ||
SeedMoviesJurassicPark.fromJson(json['jurassic_park']) {} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
json['the_matrix'] = the_matrix.toJson(); | ||
|
||
json['jurassic_park'] = jurassic_park.toJson(); | ||
|
||
return json; | ||
} | ||
|
||
SeedMoviesResponse({ | ||
required this.the_matrix, | ||
required this.jurassic_park, | ||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...rebase_data_connect/firebase_data_connect/lib/src/generated/connector_service.pbenum.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...ebase_data_connect/firebase_data_connect/lib/src/generated/google/protobuf/struct.pb.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...e_data_connect/firebase_data_connect/lib/src/generated/google/protobuf/struct.pbenum.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...e_data_connect/firebase_data_connect/lib/src/generated/google/protobuf/struct.pbjson.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...s/firebase_data_connect/firebase_data_connect/lib/src/generated/graphql_error.pbenum.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.