Example mapping
{
properties: {
key: { type: 'keyword' },
title: { type: 'text' },
releases: {
type: 'nested',
Bath Organic Farm | |
Bhangra Bus Cafe | |
Biblos Wraps | |
Big Green Breakfast Machine (Open Top Bus) | |
Buddha Bowl | |
Buddhafield Cafe | |
Bunnymans Bunnychow | |
Burger Bear | |
Chip Off The Block | |
Club Mexicana |
diff --git a/README.md b/README.md | |
index 2b34e2a..2a0b245 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -3,14 +3,13 @@ | |
## Setup | |
``` | |
-yarn && (cd client && yarn) | |
+yarn |
query1 = ` | |
mutation { | |
startStreamableWorkout(input: { exerciseSchemaVersion: 1.0 }) { | |
workout { | |
exerciseSchema { | |
version | |
schema | |
} | |
} | |
} |
Example mapping
{
properties: {
key: { type: 'keyword' },
title: { type: 'text' },
releases: {
type: 'nested',
const createModelHelpers = (model) => { | |
const query = (trx) => model.query(trx).withSchema('workout'); | |
const getById = ({ trx, id }) => query(trx).findById(id); | |
const insert = async ({ trx, input }) => query(trx).insert(input).returning('*'); | |
return { | |
query, |
// Results | |
const groupStages = [ | |
['Russia', 5, 0, 'Saudi Arabia'], | |
['Egypt', 0, 1, 'Uruguay'], | |
['Morocco', 0, 1, 'Iran'], | |
['Portugal', 3, 3, 'Spain'], | |
['France', 2, 1, 'Australia'], | |
['Argentina', 1, 1, 'Iceland'], | |
['Peru', 0, 1, 'Denmark'], | |
['Croatia', 2, 0, 'Nigeria'], |
{ | |
"notification_type": "RENEWAL", | |
"environment": "Sandbox", | |
"password": "APP_STORE_SECRET", | |
/* The latest receipt information, you should update it in your DB */ | |
"latest_receipt": "ewodnNpZ25...iMCI3d37Cn0=", | |
/* The decoded information form the latest receipt - an object not array in notifications */ | |
"latest_receipt_info": { |
{ | |
"notification_type": "CANCEL", | |
"environment": "Sandbox", | |
"password": "APP_STORE_SECRET", | |
/* The date in milliseconds at which the user cancelled */ | |
"cancellation_date_ms": "1528309241000", | |
/* The latest receipt information, now expired, but you should still update it in your DB */ | |
"latest_expired_receipt": "ewoJVEU1nYXhZO...UNhb2LIjsKfQ==", |
async verifyReceipt(encodedReceipt) { | |
const body = JSON.stringify({ | |
'receipt-data': encodedReceipt, | |
// Set in App Store Connect | |
password: process.env.APP_STORE_SECRET, | |
// This means Apple only returns the latest receipt info instead of all transactions. | |
'exclude-old-transactions': true, |