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

Adding context to all the examples of prices so they'll return integers ala TF-3944 #103

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .templates/js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function fetchData(context, sessionUrl) {
{
products[] {
name
price
price(integer)
}
}
`;
Expand Down
2 changes: 1 addition & 1 deletion .templates/python/template_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def fetch_data(context: BrowserContext, session_url):
{
products[] {
name
price
price(integer)
}
}
"""
Expand Down
2 changes: 1 addition & 1 deletion .templates/python/template_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def fetch_data(page: Page):
data_query = """
{
products[] {
price
price(integer)
}
}
"""
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ with sync_playwright() as playwright, playwright.chromium.launch(headless=False)
{
products[] {
name
price
price(integer)
}
}
"""
Expand Down Expand Up @@ -155,7 +155,7 @@ async function main() {
{
products[] {
name
price
price(integer)
}
}
`;
Expand Down
2 changes: 1 addition & 1 deletion examples/js/collect-pricing-data/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function doExtractPricingData(page) {
name
model
sku
price
price(integer)
}
}`;
const pricingData = await page.queryData(QUERY);
Expand Down
2 changes: 1 addition & 1 deletion examples/js/first-steps/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const PRODUCT_DATA_QUERY = `
price_currency
products[] {
name
price
price(integer)
}
}
`;
Expand Down
2 changes: 1 addition & 1 deletion examples/js/list-query-usage/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const fs = require('fs');
products[]
{
product_name
price
price(integer)
}
}
`;
Expand Down
2 changes: 1 addition & 1 deletion examples/python/collect_ecommerce_pricing_data/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def _do_extract_pricing_data(page: Page) -> list:
name
model
sku
price
price(integer)
}
}"""
pricing_data = await page.query_data(query)
Expand Down
2 changes: 1 addition & 1 deletion examples/python/compare_product_prices/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Define the queries to get the product price
PRODUCT_INFO_QUERY = """
{
nintendo_switch_price
nintendo_switch_price(integer)
}
"""

Expand Down
2 changes: 1 addition & 1 deletion examples/python/first_steps/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
price_currency
products[] {
name
price
price(integer)
}
}
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/python/list_query_usage/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
products[]
{
name
price
price(integer)
}
}
"""
Expand Down