מנויי רשומות פשוטים
ניתן להירשם לרשומות שנוצרות, מתעדכנות ונמחקות באמצעות פעולת מנוי GraphQL שנוצרת אוטומטית על ידי Archie Core.
בדוגמאות הבאות, יש לנו טבלה בשם students, המכילה שדות ויחסים כמו id, firstName ו-email.
יצירת מנוי
Section titled “יצירת מנוי”מנוי להאזנה לרשומות טבלה שנוצרות.
מוטציית GraphQL
Section titled “מוטציית GraphQL”mutation createSubscription($input: SubscriptionInput!) { system { createSubscription(input: $input) { id active name } }}משתנים
Section titled “משתנים”{ "input": { "name": "students_create", "description": "Subscription - students table, operation create", "active": true, "tables": [ { "table": "students", "operations": ["CREATE"], "fields": ["id", "first_name", "email"] } ] }}{ "data": { "system": { "createSubscription": { "id": "id_subscription", "active": true, "name": "students_create" } } }}עדכון מנוי
Section titled “עדכון מנוי”מנוי להאזנה לרשומות טבלה שמתעדכנות.
מוטציית GraphQL
Section titled “מוטציית GraphQL”mutation updateSubscription ($input: SubscriptionInput!) { system { updateSubscription( input: $input ) { id name description } }}משתנים
Section titled “משתנים”{ "input": { "id": "id_subscription", "name": "students_create", "description": "Subscription - students table, operation create", "active": true, "tables": [ { "table": "students", "operations": ["UPDATE", "CREATE", "DELETE"], "fields": ["id", "first_name"] } ] }}{ "data": { "system": { "updateSubscription": { "id": "id_subscription", "name": "students_create", "description": "Subscription - students table, operation create" } } }}מחיקת מנוי
Section titled “מחיקת מנוי”מנוי להאזנה לרשומות טבלה שנמחקות.
מוטציית GraphQL
Section titled “מוטציית GraphQL”mutation deleteSubscription($id: String!) { system { deleteSubscription(id: $id) }}משתנים
Section titled “משתנים”{ "id": "id_subscription"}{ "data": { "system": { "deleteSubscription": true } }}