Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b64ca40
Create CODEOWNERS
WildForkScott May 17, 2022
fd77948
Remove availableQuantity as we do not use this variable from shopify.…
Tonylib May 18, 2022
a340b20
finish remove qty avail
Tonylib May 18, 2022
3f969d5
created method for getting metafields
komalakhani May 18, 2022
54b10d2
query parameter changes.
Viratclarion May 18, 2022
c79c7ee
id parameter removed for testing.
Viratclarion May 18, 2022
f3b4e86
id parameter added.
Viratclarion May 18, 2022
11acc8e
node added in get_customer.dart.
Viratclarion May 18, 2022
4fe73dc
Metafield changes.
Viratclarion May 18, 2022
ab38ba4
node added in get_customer.dart.
Viratclarion May 19, 2022
2a5beb3
Merge branch 'removeQtyAvailable' of https://github.com/wildfork/shop…
Viratclarion May 20, 2022
0b425e1
Merge pull request #1 from wildfork/virat_getmetafields
wildforkAnthony May 20, 2022
b4c455c
curley bracket added in metafield.
Viratclarion May 20, 2022
85449e9
s removed from nodes.
Viratclarion May 20, 2022
bdc8dbe
first limit added.
Viratclarion May 20, 2022
9cb30e4
Merge pull request #2 from wildfork/virat_getmetafields
WildForkVirat May 20, 2022
0ffa0ca
customer metafield added in return method of get metafields.
Viratclarion May 23, 2022
0d22a0e
Storefront API mutation added.
Viratclarion May 24, 2022
9d351ab
get metafield query added.
Viratclarion Jun 6, 2022
f28eb1b
Get meta field method added.
Viratclarion Jun 6, 2022
775da62
minor changes
Viratclarion Jun 7, 2022
797c01f
Minor change in query.
Viratclarion Jun 7, 2022
23c3740
Minor change in query.
Viratclarion Jun 7, 2022
5e96260
Minor change in ID.
Viratclarion Jun 7, 2022
9973c80
Minor change in query.
Viratclarion Jun 7, 2022
4c78aa1
Minor change in query.
Viratclarion Jun 7, 2022
0ca6deb
Minor change in query.
Viratclarion Jun 7, 2022
8020f0c
Minor change in query.
Viratclarion Jun 7, 2022
063aa99
Minor change in query.
Viratclarion Jun 7, 2022
e793e6b
Minor change in query.
Viratclarion Jun 7, 2022
6058cef
Minor change in query.
Viratclarion Jun 7, 2022
6f07371
Minor change in query.
Viratclarion Jun 7, 2022
7b2571d
Minor change in query.
Viratclarion Jun 7, 2022
4ed0c98
Dynamic ID added.
Viratclarion Jun 7, 2022
db1e678
Delete allow_storefront_api_access.dart
WildForkVirat Jun 7, 2022
e23e9a3
Update get_meta_field.dart
WildForkVirat Jun 7, 2022
87b31fd
Delete shopify_product.dart
WildForkVirat Jun 7, 2022
922cb1c
Merge pull request #3 from wildfork/virat_getmetafields
wildforkAnthony Jun 7, 2022
a730ff1
Last name added in customer_create.dart query.
Viratclarion Jun 10, 2022
e951cb8
Merge branch 'master' of https://github.com/wildfork/shopify-mobile-a…
Viratclarion Jun 10, 2022
aef199e
Get metafields count changed to 10.
Viratclarion Jun 27, 2022
65de579
Minor changes.
Viratclarion Jun 27, 2022
002a5ff
ProductId changed to ownerId.
Viratclarion Jun 28, 2022
5714c7b
Value type and description added.
Viratclarion Jun 28, 2022
4581fc6
Product variant metaField added.
Viratclarion Jun 29, 2022
666ee2a
Product variant metaField removed.
Viratclarion Jun 29, 2022
1257c02
Product variant metaField query added.
Viratclarion Jun 30, 2022
aff8dfd
Minor changes in query.
Viratclarion Jun 30, 2022
d4bf754
Minor changes in query.
Viratclarion Jun 30, 2022
be2dee6
Minor changes in query.
Viratclarion Jun 30, 2022
2660083
Minor changes in query.
Viratclarion Jun 30, 2022
86da12e
Minor changes in query.
Viratclarion Jun 30, 2022
18f847f
Minor changes in query.
Viratclarion Jun 30, 2022
481e545
First and last added.
Viratclarion Jul 1, 2022
c993222
product variant query changes.
Viratclarion Jul 28, 2022
52b529f
product variant query changes in meta field.
Viratclarion Jul 28, 2022
dd56877
namespace added.
Viratclarion Jul 28, 2022
cac1d09
Product variant added.
Viratclarion Jul 28, 2022
5ed94d9
Metafield changes.
Viratclarion Jul 28, 2022
3c78a40
Changes to handle Orders
Tonylib Aug 30, 2022
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The following team is the owner for everything in the repo. Everyone in
# the team will be requested for review when someone opens a pull request.
* @wildfork/us-mobile-app
22 changes: 11 additions & 11 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -119,7 +119,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
Expand All @@ -145,7 +145,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.25-alpha"
version: "0.0.26-alpha"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -260,7 +260,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "0.6.4"
json_annotation:
dependency: transitive
description:
Expand Down Expand Up @@ -295,7 +295,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -323,7 +323,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_provider_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -468,7 +468,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -503,7 +503,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
version: "0.4.9"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -580,7 +580,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
watcher:
dependency: transitive
description:
Expand Down Expand Up @@ -617,5 +617,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.15.0 <3.0.0"
flutter: ">=2.10.1"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.10.0"
1 change: 1 addition & 0 deletions lib/graphql_operations/mutations/customer_create.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ mutation MyMutation($firstName: String, $lastName: String, $email: String!, $pas
displayName
email
firstName
lastName
id
lastIncompleteCheckout {
completedAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ query($id : ID!, $cursor : String, $sortKey: ProductCollectionSortKeys){
}
availableForSale
id
quantityAvailable
unitPrice {
amount
currencyCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ query( $cursor: String, $sortKey : ProductSortKeys, $query: String, $reverse: Bo
value
}
id
quantityAvailable
}
}
}
Expand Down
1 change: 0 additions & 1 deletion lib/graphql_operations/queries/get_collections.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ query($cursor: String, $sortKey: CollectionSortKeys, $reverse: Boolean){
value
}
availableForSale
quantityAvailable
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions lib/graphql_operations/queries/get_customer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ query($customerAccessToken : String!){
firstName
id
lastName
metafields(first:250) {
edges {
node {
id
key
namespace
value
}
}
}
lastIncompleteCheckout {
completedAt
createdAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ query getFeaturedCollectionQuery($query: String!){
sku
requiresShipping
availableForSale
quantityAvailable
selectedOptions {
name
value
Expand Down
38 changes: 38 additions & 0 deletions lib/graphql_operations/queries/get_meta_field.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const String getMetaField = r'''
query ProductMetafields($ownerId : ID!){
product(id: $ownerId) {
id
title
metafields(namespace: "wildfox", first: 50) {
edges {
node {
id
namespace
key
value
valueType
description
}
}
}
variants(first : 50){
edges {
node {
id
title
metafields (first : 50, namespace: "wildfox"){
edges {
node {
id
namespace
key
value
}
}
}
}
}
}
}
}
''';
1 change: 0 additions & 1 deletion lib/graphql_operations/queries/get_n_products.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ query($n : Int, $sortKey : ProductSortKeys, $reverse: Boolean){
availableForSale
sku
requiresShipping
quantityAvailable
selectedOptions {
name
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ query getProductRecommentationsQuery($id: ID!){
availableForSale
sku
requiresShipping
quantityAvailable
selectedOptions {
name
value
Expand Down
1 change: 0 additions & 1 deletion lib/graphql_operations/queries/get_products.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ query($cursor : String, $metafieldsNamespace : String){
availableForSale
sku
requiresShipping
quantityAvailable
selectedOptions {
name
value
Expand Down
3 changes: 1 addition & 2 deletions lib/graphql_operations/queries/get_products_by_handle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ query getProductByHandle($handle : String!){
amount
currencyCode
}
quantityAvailable
}
}
}
}
}
''';
''';
1 change: 0 additions & 1 deletion lib/graphql_operations/queries/get_products_by_ids.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ query($ids : [ID!]!){
value
}
id
quantityAvailable
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ query($cursor: String, $sortKey: CollectionSortKeys, $sortKeyProduct: ProductCol
value
}
availableForSale
quantityAvailable
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ query($cursor : String, $x : Int, $reverse: Boolean, $sortKey: ProductSortKeys){
availableForSale
sku
requiresShipping
quantityAvailable
selectedOptions {
name
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ query($id : ID!, $cursor : String, $limit : Int, $sortKey : ProductCollectionSor
}
availableForSale
id
quantityAvailable
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ query( $cursor: String, $limit : Int, $sortKey : ProductSortKeys, $query: String
value
}
id
quantityAvailable
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions lib/models/src/order/line_item_order/line_item_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ class LineItemOrder with _$LineItemOrder {
return LineItemOrder(
currentQuantity: (json['node'] ?? const {})['currentQuantity'],
discountAllocations: _getDiscountAllocationsList(json),
discountedTotalPrice: PriceV2.fromJson(
(json['node'] ?? const {})['discountedTotalPrice']),
discountedTotalPrice: PriceV2.fromJson((json['node'] ??
const {})['discountedTotalPrice'] as Map<String, dynamic>),
originalTotalPrice:
PriceV2.fromJson((json['node'] ?? const {})['originalTotalPrice']),
quantity: (json['node'] ?? const {})['quantity'],
title: (json['node'] ?? const {})['title'],
variant: ProductVariantCheckout.fromJson(
(json['node'] ?? const {})['variant'] ?? const {}));
variant: json['node']!['variant'] == null
? null
: ProductVariantCheckout.fromJson(
(json['node'] ?? const {})['variant'] ?? const {}));
}

static _getDiscountAllocationsList(Map<String, dynamic> json) {
Expand Down
4 changes: 2 additions & 2 deletions lib/models/src/order/line_items_order/line_items_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class LineItemsOrder with _$LineItemsOrder {

static _getLineItemOrderList(Map<String, dynamic> json) {
List<LineItemOrder> lineItemListOrder = [];
json['edges']?.forEach((lineItemOrder) =>
lineItemListOrder.add(LineItemOrder.fromGraphJson(lineItemOrder)));
json['edges']?.forEach((lineItemOrder) => lineItemListOrder.add(
LineItemOrder.fromGraphJson(lineItemOrder as Map<String, dynamic>)));
return lineItemListOrder;
}
}
2 changes: 1 addition & 1 deletion lib/models/src/order/order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Order with _$Order {
email: (json['node'] ?? const {})['email'],
currencyCode: (json['node'] ?? const {})['currencyCode'],
customerUrl: (json['node'] ?? const {})['customerUrl'],
lineItems: LineItemsOrder.fromJson(
lineItems: LineItemsOrder.fromGraphJson(
(json['node'] ?? const {})['lineItems'] ?? const {}),
name: (json['node'] ?? const {})['name'],
orderNumber: (json['node'] ?? const {})['orderNumber'],
Expand Down
22 changes: 11 additions & 11 deletions lib/models/src/order/order.g.dart

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

4 changes: 2 additions & 2 deletions lib/models/src/order/orders/orders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ part 'orders.g.dart';
class Orders with _$Orders {
factory Orders({required List<Order> orderList, required bool hasNextPage}) =
_Orders;

factory Orders.fromJson(Map<String, dynamic> json) => _$OrdersFromJson(json);

static Orders fromGraphJson(Map<String, dynamic> json) {
return Orders(
orderList: _getOrderList(json),
hasNextPage: (json['pageInfo'] ?? const {})['hasNextPage']);
hasNextPage: false); //(json['pageInfo'] ?? const {})['hasNextPage']);
}

static List<Order> _getOrderList(Map<String, dynamic> json) {
Expand Down
8 changes: 4 additions & 4 deletions lib/models/src/order/orders/orders.g.dart

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

7 changes: 3 additions & 4 deletions lib/models/src/product/metafield/metafield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class Metafield with _$Metafield {
required String namespace,
required String key,
required String value,
required String valueType,
@Default('') String description,

}) = _Metafield;

static Metafield fromGraphJson(Map<String, dynamic> json) {
Expand All @@ -22,8 +21,8 @@ class Metafield with _$Metafield {
namespace: (json['node'] ?? const {})['namespace'],
key: (json['node'] ?? const {})['key'],
value: (json['node'] ?? const {})['value'],
valueType: (json['node'] ?? const {})['valueType'],
description: (json['node'] ?? const {})['description']);

);
}

factory Metafield.fromJson(Map<String, dynamic> json) =>
Expand Down
Loading