-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[DOCS-3787] Remove FQL typer workarounds" (#14)
This reverts commit 01995bd.
- Loading branch information
Showing
8 changed files
with
65 additions
and
60 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ public static void Init(Client client) | |
{name: 'The Godfather II', price: 1299, description: 'A movie by Francis Ford Coppola', stock: 10, category: 'movies'}, | ||
{name: 'The Godfather III', price: 1299, description: 'A movie by Francis Ford Coppola', stock: 10, category: 'movies'} | ||
].map(p => { | ||
let existing = Product.byName(p.name).first() | ||
let existing: Any = Product.byName(p.name).first() | ||
if (existing != null) { | ||
existing!.update({ stock: p.stock }) | ||
} else { | ||
|
@@ -85,16 +85,16 @@ public static void Init(Client client) | |
client.QueryAsync(Query.FQL($$""" | ||
let customer = Customer.byEmail('[email protected]').first()! | ||
let orders = ['cart', 'processing', 'shipped', 'delivered'].map(status => { | ||
let order = Order.byCustomer(customer).firstWhere(o => o.status == status) | ||
let order: Any = Order.byCustomer(customer).firstWhere(o => o.status == status) | ||
if (order == null) { | ||
let newOrder = Order.create({ | ||
let newOrder: Any = Order.create({ | ||
customer: customer, | ||
status: status, | ||
createdAt: Time.now(), | ||
payment: {} | ||
}) | ||
let product = Product.byName('Drone').first()! | ||
let orderItem = OrderItem.create({ order: newOrder, product: product, quantity: 1 }) | ||
let product: Any = Product.byName('Drone').first()! | ||
let orderItem: Any = OrderItem.create({ order: newOrder, product: product, quantity: 1 }) | ||
orderItem | ||
newOrder | ||
} else { | ||
|
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
Oops, something went wrong.